home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / System 7 / Frontier / Frontier SDK 2.1.sit / Frontier SDK 2.1 / Toolkits / Applet Toolkit / applettextedit.c < prev    next >
MacBinary  |  1992-10-11  |  15.5 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Oct 11 14:30:00 1992, modified Sun Oct 11 14:30:00 1992, creator Think C, type ASCII, 15233 bytes "applettextedit.c" , at 0x3c01 364 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 10 61 70 70 6c 65 74 | 74 65 78 74 65 64 69 74 |..applet|textedit|
|00000010| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 3b 81 00 | 00 01 6c a6 fe 23 28 a6 |.....;..|..l..#(.|
|00000060| fe 23 28 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.#(.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 22 ed 00 00 |........|...."...|
|00000080| 0d 2f 2a a9 20 43 6f 70 | 79 72 69 67 68 74 20 31 |./*. Cop|yright 1|
|00000090| 39 38 38 2d 31 39 39 32 | 20 55 73 65 72 4c 61 6e |988-1992| UserLan|
|000000a0| 64 20 53 6f 66 74 77 61 | 72 65 2c 20 49 6e 63 2e |d Softwa|re, Inc.|
|000000b0| 20 20 41 6c 6c 20 52 69 | 67 68 74 73 20 52 65 73 | All Ri|ghts Res|
|000000c0| 65 72 76 65 64 2e 2a 2f | 0d 0d 0d 23 69 6e 63 6c |erved.*/|...#incl|
|000000d0| 75 64 65 20 22 61 70 70 | 6c 65 74 6d 65 6d 6f 72 |ude "app|letmemor|
|000000e0| 79 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 61 |y.h".#in|clude "a|
|000000f0| 70 70 6c 65 74 66 6f 6e | 74 2e 68 22 0d 23 69 6e |ppletfon|t.h".#in|
|00000100| 63 6c 75 64 65 20 22 61 | 70 70 6c 65 74 73 74 72 |clude "a|ppletstr|
|00000110| 69 6e 67 73 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |ings.h".|#include|
|00000120| 20 22 61 70 70 6c 65 74 | 71 75 69 63 6b 64 72 61 | "applet|quickdra|
|00000130| 77 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 61 |w.h".#in|clude "a|
|00000140| 70 70 6c 65 74 74 65 78 | 74 65 64 69 74 2e 68 22 |pplettex|tedit.h"|
|00000150| 0d 0d 0d 0d 74 79 70 65 | 64 65 66 20 73 74 72 75 |....type|def stru|
|00000160| 63 74 20 74 79 73 63 72 | 6f 6c 6c 64 61 74 61 20 |ct tyscr|olldata |
|00000170| 7b 0d 09 0d 09 52 65 63 | 74 20 6f 72 69 67 64 65 |{....Rec|t origde|
|00000180| 73 74 72 65 63 74 3b 0d | 09 0d 09 73 68 6f 72 74 |strect;.|...short|
|00000190| 20 6f 72 69 67 6c 65 6e | 3b 0d 09 7d 20 74 79 73 | origlen|;..} tys|
|000001a0| 63 72 6f 6c 6c 64 61 74 | 61 3b 0d 09 0d 74 79 73 |crolldat|a;...tys|
|000001b0| 63 72 6f 6c 6c 64 61 74 | 61 20 73 63 72 6f 6c 6c |crolldat|a scroll|
|000001c0| 64 61 74 61 3b 0d 0d 0d | 0d 0d 73 74 61 74 69 63 |data;...|..static|
|000001d0| 20 62 6f 6f 6c 65 61 6e | 20 67 65 74 6d 61 63 62 | boolean| getmacb|
|000001e0| 75 66 66 65 72 20 28 68 | 64 6c 65 64 69 74 72 65 |uffer (h|dleditre|
|000001f0| 63 6f 72 64 20 68 62 75 | 66 66 65 72 2c 20 54 45 |cord hbu|ffer, TE|
|00000200| 48 61 6e 64 6c 65 20 2a | 6d 61 63 62 75 66 66 65 |Handle *|macbuffe|
|00000210| 72 29 20 7b 0d 0d 09 69 | 66 20 28 68 62 75 66 66 |r) {...i|f (hbuff|
|00000220| 65 72 20 3d 3d 20 6e 69 | 6c 29 0d 09 09 72 65 74 |er == ni|l)...ret|
|00000230| 75 72 6e 20 28 66 61 6c | 73 65 29 3b 0d 09 09 0d |urn (fal|se);....|
|00000240| 09 2a 6d 61 63 62 75 66 | 66 65 72 20 3d 20 28 2a |.*macbuf|fer = (*|
|00000250| 2a 68 62 75 66 66 65 72 | 29 2e 6d 61 63 62 75 66 |*hbuffer|).macbuf|
|00000260| 66 65 72 3b 0d 09 0d 09 | 72 65 74 75 72 6e 20 28 |fer;....|return (|
|00000270| 2a 6d 61 63 62 75 66 66 | 65 72 20 21 3d 20 6e 69 |*macbuff|er != ni|
|00000280| 6c 29 3b 0d 09 7d 20 2f | 2a 67 65 74 6d 61 63 62 |l);..} /|*getmacb|
|00000290| 75 66 66 65 72 2a 2f 0d | 09 0d 0d 73 74 61 74 69 |uffer*/.|...stati|
|000002a0| 63 20 76 6f 69 64 20 65 | 64 69 74 70 72 65 73 63 |c void e|ditpresc|
|000002b0| 72 6f 6c 6c 20 28 68 64 | 6c 65 64 69 74 72 65 63 |roll (hd|leditrec|
|000002c0| 6f 72 64 20 68 62 75 66 | 66 65 72 29 20 7b 0d 0d |ord hbuf|fer) {..|
|000002d0| 09 54 45 48 61 6e 64 6c | 65 20 6d 61 63 62 75 66 |.TEHandl|e macbuf|
|000002e0| 66 65 72 3b 0d 09 0d 09 | 69 66 20 28 21 67 65 74 |fer;....|if (!get|
|000002f0| 6d 61 63 62 75 66 66 65 | 72 20 28 68 62 75 66 66 |macbuffe|r (hbuff|
|00000300| 65 72 2c 20 26 6d 61 63 | 62 75 66 66 65 72 29 29 |er, &mac|buffer))|
|00000310| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 0d 09 73 63 72 |...retur|n;...scr|
|00000320| 6f 6c 6c 64 61 74 61 2e | 6f 72 69 67 64 65 73 74 |olldata.|origdest|
|00000330| 72 65 63 74 20 3d 20 28 | 2a 2a 6d 61 63 62 75 66 |rect = (|**macbuf|
|00000340| 66 65 72 29 2e 64 65 73 | 74 52 65 63 74 3b 0d 09 |fer).des|tRect;..|
|00000350| 0d 09 73 63 72 6f 6c 6c | 64 61 74 61 2e 6f 72 69 |..scroll|data.ori|
|00000360| 67 6c 65 6e 20 3d 20 28 | 2a 2a 6d 61 63 62 75 66 |glen = (|**macbuf|
|00000370| 66 65 72 29 2e 74 65 4c | 65 6e 67 74 68 3b 0d 09 |fer).teL|ength;..|
|00000380| 7d 20 2f 2a 65 64 69 74 | 70 72 65 73 63 72 6f 6c |} /*edit|prescrol|
|00000390| 6c 2a 2f 0d 09 0d 09 0d | 73 74 61 74 69 63 20 76 |l*/.....|static v|
|000003a0| 6f 69 64 20 65 64 69 74 | 73 65 74 73 63 72 6f 6c |oid edit|setscrol|
|000003b0| 6c 76 61 6c 75 65 73 20 | 28 68 64 6c 65 64 69 74 |lvalues |(hdledit|
|000003c0| 72 65 63 6f 72 64 20 68 | 62 75 66 66 65 72 29 20 |record h|buffer) |
|000003d0| 7b 0d 0d 09 54 45 48 61 | 6e 64 6c 65 20 6d 61 63 |{...TEHa|ndle mac|
|000003e0| 62 75 66 66 65 72 3b 0d | 09 52 65 63 74 20 64 65 |buffer;.|.Rect de|
|000003f0| 73 74 72 65 63 74 2c 20 | 76 69 65 77 72 65 63 74 |strect, |viewrect|
|00000400| 3b 0d 09 62 6f 6f 6c 65 | 61 6e 20 66 6c 73 63 72 |;..boole|an flscr|
|00000410| 6f 6c 6c 65 64 3b 0d 09 | 0d 09 69 66 20 28 21 67 |olled;..|..if (!g|
|00000420| 65 74 6d 61 63 62 75 66 | 66 65 72 20 28 68 62 75 |etmacbuf|fer (hbu|
|00000430| 66 66 65 72 2c 20 26 6d | 61 63 62 75 66 66 65 72 |ffer, &m|acbuffer|
|00000440| 29 29 0d 09 09 72 65 74 | 75 72 6e 3b 0d 09 0d 09 |))...ret|urn;....|
|00000450| 66 6c 73 63 72 6f 6c 6c | 65 64 20 3d 20 73 63 72 |flscroll|ed = scr|
|00000460| 6f 6c 6c 64 61 74 61 2e | 6f 72 69 67 6c 65 6e 20 |olldata.|origlen |
|00000470| 21 3d 20 28 2a 2a 6d 61 | 63 62 75 66 66 65 72 29 |!= (**ma|cbuffer)|
|00000480| 2e 74 65 4c 65 6e 67 74 | 68 3b 0d 09 0d 09 69 66 |.teLengt|h;....if|
|00000490| 20 28 21 66 6c 73 63 72 | 6f 6c 6c 65 64 29 0d 09 | (!flscr|olled)..|
|000004a0| 09 66 6c 73 63 72 6f 6c | 6c 65 64 20 3d 20 21 65 |.flscrol|led = !e|
|000004b0| 71 75 61 6c 72 65 63 74 | 73 20 28 73 63 72 6f 6c |qualrect|s (scrol|
|000004c0| 6c 64 61 74 61 2e 6f 72 | 69 67 64 65 73 74 72 65 |ldata.or|igdestre|
|000004d0| 63 74 2c 20 28 2a 2a 6d | 61 63 62 75 66 66 65 72 |ct, (**m|acbuffer|
|000004e0| 29 2e 64 65 73 74 52 65 | 63 74 29 3b 0d 09 09 0d |).destRe|ct);....|
|000004f0| 09 28 2a 2a 68 62 75 66 | 66 65 72 29 2e 66 6c 73 |.(**hbuf|fer).fls|
|00000500| 63 72 6f 6c 6c 65 64 20 | 3d 20 66 6c 73 63 72 6f |crolled |= flscro|
|00000510| 6c 6c 65 64 3b 0d 09 0d | 09 64 65 73 74 72 65 63 |lled;...|.destrec|
|00000520| 74 20 3d 20 28 2a 2a 6d | 61 63 62 75 66 66 65 72 |t = (**m|acbuffer|
|00000530| 29 2e 64 65 73 74 52 65 | 63 74 3b 0d 09 0d 09 76 |).destRe|ct;....v|
|00000540| 69 65 77 72 65 63 74 20 | 3d 20 28 2a 2a 6d 61 63 |iewrect |= (**mac|
|00000550| 62 75 66 66 65 72 29 2e | 76 69 65 77 52 65 63 74 |buffer).|viewRect|
|00000560| 3b 0d 09 0d 09 28 2a 2a | 68 62 75 66 66 65 72 29 |;....(**|hbuffer)|
|00000570| 2e 76 65 72 74 63 75 72 | 72 65 6e 74 20 3d 20 76 |.vertcur|rent = v|
|00000580| 69 65 77 72 65 63 74 2e | 74 6f 70 20 2d 20 64 65 |iewrect.|top - de|
|00000590| 73 74 72 65 63 74 2e 74 | 6f 70 3b 0d 09 0d 09 28 |strect.t|op;....(|
|000005a0| 2a 2a 68 62 75 66 66 65 | 72 29 2e 68 6f 72 69 7a |**hbuffe|r).horiz|
|000005b0| 63 75 72 72 65 6e 74 20 | 3d 20 76 69 65 77 72 65 |current |= viewre|
|000005c0| 63 74 2e 6c 65 66 74 20 | 2d 20 64 65 73 74 72 65 |ct.left |- destre|
|000005d0| 63 74 2e 6c 65 66 74 3b | 0d 09 7d 20 2f 2a 65 64 |ct.left;|..} /*ed|
|000005e0| 69 74 73 65 74 73 63 72 | 6f 6c 6c 76 61 6c 75 65 |itsetscr|ollvalue|
|000005f0| 73 2a 2f 0d 09 0d 09 0d | 73 74 61 74 69 63 20 73 |s*/.....|static s|
|00000600| 68 6f 72 74 20 67 65 74 | 54 45 6a 75 73 74 69 66 |hort get|TEjustif|
|00000610| 69 63 61 74 69 6f 6e 20 | 28 74 79 6a 75 73 74 69 |ication |(tyjusti|
|00000620| 66 69 63 61 74 69 6f 6e | 20 6a 75 73 74 69 66 69 |fication| justifi|
|00000630| 63 61 74 69 6f 6e 29 20 | 7b 0d 09 0d 09 73 77 69 |cation) |{....swi|
|00000640| 74 63 68 20 28 6a 75 73 | 74 69 66 69 63 61 74 69 |tch (jus|tificati|
|00000650| 6f 6e 29 20 7b 0d 09 09 | 0d 09 09 63 61 73 65 20 |on) {...|...case |
|00000660| 6c 65 66 74 6a 75 73 74 | 69 66 69 65 64 3a 0d 09 |leftjust|ified:..|
|00000670| 09 09 72 65 74 75 72 6e | 20 28 74 65 4a 75 73 74 |..return| (teJust|
|00000680| 4c 65 66 74 29 3b 0d 09 | 09 09 0d 09 09 63 61 73 |Left);..|.....cas|
|00000690| 65 20 63 65 6e 74 65 72 | 6a 75 73 74 69 66 69 65 |e center|justifie|
|000006a0| 64 3a 0d 09 09 09 72 65 | 74 75 72 6e 20 28 74 65 |d:....re|turn (te|
|000006b0| 4a 75 73 74 43 65 6e 74 | 65 72 29 3b 0d 09 09 09 |JustCent|er);....|
|000006c0| 0d 09 09 63 61 73 65 20 | 72 69 67 68 74 6a 75 73 |...case |rightjus|
|000006d0| 74 69 66 69 65 64 3a 0d | 09 09 09 72 65 74 75 72 |tified:.|...retur|
|000006e0| 6e 20 28 74 65 4a 75 73 | 74 52 69 67 68 74 29 3b |n (teJus|tRight);|
|000006f0| 0d 09 09 7d 20 2f 2a 73 | 77 69 74 63 68 2a 2f 0d |...} /*s|witch*/.|
|00000700| 0d 09 72 65 74 75 72 6e | 20 28 74 65 4a 75 73 74 |..return| (teJust|
|00000710| 4c 65 66 74 29 3b 0d 09 | 7d 20 2f 2a 67 65 74 54 |Left);..|} /*getT|
|00000720| 45 6a 75 73 74 69 66 69 | 63 61 74 69 6f 6e 2a 2f |Ejustifi|cation*/|
|00000730| 0d 09 0d 0d 62 6f 6f 6c | 65 61 6e 20 65 64 69 74 |....bool|ean edit|
|00000740| 6e 65 77 62 75 66 66 65 | 72 20 28 52 65 63 74 20 |newbuffe|r (Rect |
|00000750| 72 2c 20 62 6f 6f 6c 65 | 61 6e 20 66 6c 77 6f 72 |r, boole|an flwor|
|00000760| 64 77 72 61 70 2c 20 62 | 69 67 73 74 72 69 6e 67 |dwrap, b|igstring|
|00000770| 20 62 73 2c 20 68 64 6c | 65 64 69 74 72 65 63 6f | bs, hdl|editreco|
|00000780| 72 64 20 2a 68 72 65 63 | 6f 72 64 29 20 7b 0d 09 |rd *hrec|ord) {..|
|00000790| 0d 09 72 65 67 69 73 74 | 65 72 20 68 64 6c 65 64 |..regist|er hdled|
|000007a0| 69 74 72 65 63 6f 72 64 | 20 68 3b 0d 09 72 65 67 |itrecord| h;..reg|
|000007b0| 69 73 74 65 72 20 54 45 | 48 61 6e 64 6c 65 20 6d |ister TE|Handle m|
|000007c0| 61 63 62 75 66 66 65 72 | 3b 0d 09 0d 09 69 66 20 |acbuffer|;....if |
|000007d0| 28 21 6e 65 77 63 6c 65 | 61 72 68 61 6e 64 6c 65 |(!newcle|arhandle|
|000007e0| 20 28 6c 6f 6e 67 73 69 | 7a 65 6f 66 20 28 74 79 | (longsi|zeof (ty|
|000007f0| 65 64 69 74 72 65 63 6f | 72 64 29 2c 20 28 48 61 |editreco|rd), (Ha|
|00000800| 6e 64 6c 65 20 2a 29 20 | 68 72 65 63 6f 72 64 29 |ndle *) |hrecord)|
|00000810| 29 0d 09 09 72 65 74 75 | 72 6e 20 28 66 61 6c 73 |)...retu|rn (fals|
|00000820| 65 29 3b 0d 09 09 0d 09 | 68 20 3d 20 2a 68 72 65 |e);.....|h = *hre|
|00000830| 63 6f 72 64 3b 20 2f 2a | 63 6f 70 79 20 69 6e 74 |cord; /*|copy int|
|00000840| 6f 20 72 65 67 69 73 74 | 65 72 2a 2f 0d 09 0d 09 |o regist|er*/....|
|00000850| 49 6e 73 65 74 52 65 63 | 74 20 28 26 72 2c 20 74 |InsetRec|t (&r, t|
|00000860| 65 78 74 68 6f 72 69 7a | 69 6e 73 65 74 2c 20 74 |exthoriz|inset, t|
|00000870| 65 78 74 76 65 72 74 69 | 6e 73 65 74 29 3b 0d 09 |extverti|nset);..|
|00000880| 09 0d 09 6d 61 63 62 75 | 66 66 65 72 20 3d 20 54 |...macbu|ffer = T|
|00000890| 45 4e 65 77 20 28 26 72 | 2c 20 26 72 29 3b 0d 09 |ENew (&r|, &r);..|
|000008a0| 0d 09 69 66 20 28 6d 61 | 63 62 75 66 66 65 72 20 |..if (ma|cbuffer |
|000008b0| 3d 3d 20 6e 69 6c 29 20 | 7b 20 2f 2a 6d 65 6d 6f |== nil) |{ /*memo|
|000008c0| 72 79 20 65 72 72 6f 72 | 2a 2f 0d 09 09 0d 09 09 |ry error|*/......|
|000008d0| 64 69 73 70 6f 73 65 68 | 61 6e 64 6c 65 20 28 28 |disposeh|andle ((|
|000008e0| 48 61 6e 64 6c 65 29 20 | 68 29 3b 0d 09 09 0d 09 |Handle) |h);.....|
|000008f0| 09 2a 68 72 65 63 6f 72 | 64 20 3d 20 6e 69 6c 3b |.*hrecor|d = nil;|
|00000900| 0d 09 09 0d 09 09 72 65 | 74 75 72 6e 20 28 66 61 |......re|turn (fa|
|00000910| 6c 73 65 29 3b 0d 09 09 | 7d 0d 09 09 0d 09 69 66 |lse);...|}.....if|
|00000920| 20 28 66 6c 77 6f 72 64 | 77 72 61 70 29 0d 09 09 | (flword|wrap)...|
|00000930| 28 2a 2a 6d 61 63 62 75 | 66 66 65 72 29 2e 63 72 |(**macbu|ffer).cr|
|00000940| 4f 6e 6c 79 20 3d 20 31 | 3b 0d 09 65 6c 73 65 0d |Only = 1|;..else.|
|00000950| 09 09 28 2a 2a 6d 61 63 | 62 75 66 66 65 72 29 2e |..(**mac|buffer).|
|00000960| 63 72 4f 6e 6c 79 20 3d | 20 2d 31 3b 0d 0d 09 54 |crOnly =| -1;...T|
|00000970| 45 53 65 74 54 65 78 74 | 20 28 26 62 73 20 5b 31 |ESetText| (&bs [1|
|00000980| 5d 2c 20 28 6c 6f 6e 67 | 29 20 73 74 72 69 6e 67 |], (long|) string|
|00000990| 6c 65 6e 67 74 68 20 28 | 62 73 29 2c 20 6d 61 63 |length (|bs), mac|
|000009a0| 62 75 66 66 65 72 29 3b | 0d 09 0d 09 54 45 41 63 |buffer);|....TEAc|
|000009b0| 74 69 76 61 74 65 20 28 | 6d 61 63 62 75 66 66 65 |tivate (|macbuffe|
|000009c0| 72 29 3b 0d 09 0d 09 28 | 2a 2a 68 29 2e 6d 61 63 |r);....(|**h).mac|
|000009d0| 62 75 66 66 65 72 20 3d | 20 6d 61 63 62 75 66 66 |buffer =| macbuff|
|000009e0| 65 72 3b 0d 09 0d 09 72 | 65 74 75 72 6e 20 28 74 |er;....r|eturn (t|
|000009f0| 72 75 65 29 3b 0d 09 7d | 20 2f 2a 65 64 69 74 6e |rue);..}| /*editn|
|00000a00| 65 77 62 75 66 66 65 72 | 2a 2f 0d 09 0d 09 0d 76 |ewbuffer|*/.....v|
|00000a10| 6f 69 64 20 65 64 69 74 | 75 70 64 61 74 65 20 28 |oid edit|update (|
|00000a20| 68 64 6c 65 64 69 74 72 | 65 63 6f 72 64 20 68 62 |hdleditr|ecord hb|
|00000a30| 75 66 66 65 72 29 20 7b | 0d 09 0d 09 54 45 48 61 |uffer) {|....TEHa|
|00000a40| 6e 64 6c 65 20 6d 61 63 | 62 75 66 66 65 72 3b 0d |ndle mac|buffer;.|
|00000a50| 09 52 65 63 74 20 72 3b | 0d 09 0d 09 69 66 20 28 |.Rect r;|....if (|
|00000a60| 21 67 65 74 6d 61 63 62 | 75 66 66 65 72 20 28 68 |!getmacb|uffer (h|
|00000a70| 62 75 66 66 65 72 2c 20 | 26 6d 61 63 62 75 66 66 |buffer, |&macbuff|
|00000a80| 65 72 29 29 0d 09 09 72 | 65 74 75 72 6e 3b 0d 09 |er))...r|eturn;..|
|00000a90| 09 0d 09 72 20 3d 20 28 | 2a 2a 6d 61 63 62 75 66 |...r = (|**macbuf|
|00000aa0| 66 65 72 29 2e 76 69 65 | 77 52 65 63 74 3b 0d 09 |fer).vie|wRect;..|
|00000ab0| 0d 09 54 45 55 70 64 61 | 74 65 20 28 26 72 2c 20 |..TEUpda|te (&r, |
|00000ac0| 6d 61 63 62 75 66 66 65 | 72 29 3b 0d 09 7d 20 2f |macbuffe|r);..} /|
|00000ad0| 2a 65 64 69 74 75 70 64 | 61 74 65 2a 2f 0d 09 0d |*editupd|ate*/...|
|00000ae0| 09 0d 76 6f 69 64 20 65 | 64 69 74 75 70 64 61 74 |..void e|ditupdat|
|00000af0| 65 70 6f 72 74 20 28 68 | 64 6c 65 64 69 74 72 65 |eport (h|dleditre|
|00000b00| 63 6f 72 64 20 68 62 75 | 66 66 65 72 2c 20 52 65 |cord hbu|ffer, Re|
|00000b10| 63 74 20 72 70 6f 72 74 | 2c 20 57 69 6e 64 6f 77 |ct rport|, Window|
|00000b20| 50 74 72 20 77 29 20 7b | 0d 09 0d 09 2f 2a 0d 09 |Ptr w) {|..../*..|
|00000b30| 38 2f 32 36 2f 39 32 20 | 44 57 3a 20 75 70 64 61 |8/26/92 |DW: upda|
|00000b40| 74 65 20 74 68 65 20 54 | 45 20 68 61 6e 64 6c 65 |te the T|E handle|
|00000b50| 2c 20 62 75 74 20 64 6f | 20 69 74 20 69 6e 20 61 |, but do| it in a|
|00000b60| 20 70 6f 72 74 20 64 69 | 66 66 65 72 65 6e 74 20 | port di|fferent |
|00000b70| 66 72 6f 6d 20 74 68 65 | 0d 09 6f 6e 65 20 69 74 |from the|..one it|
|00000b80| 20 6c 69 76 65 73 20 69 | 6e 73 69 64 65 20 6f 66 | lives i|nside of|
|00000b90| 2e 20 6e 65 65 64 20 74 | 68 69 73 20 74 6f 20 73 |. need t|his to s|
|00000ba0| 75 70 70 6f 72 74 20 70 | 72 69 6e 74 69 6e 67 20 |upport p|rinting |
|00000bb0| 69 6e 20 4d 69 6e 41 70 | 70 2e 0d 09 0d 09 39 2f |in MinAp|p.....9/|
|00000bc0| 33 2f 39 32 20 44 57 3a | 20 61 64 64 20 22 72 70 |3/92 DW:| add "rp|
|00000bd0| 6f 72 74 22 20 70 61 72 | 61 6d 65 74 65 72 2c 20 |ort" par|ameter, |
|00000be0| 74 6f 20 61 6c 6c 6f 77 | 20 74 68 65 20 63 61 6c |to allow| the cal|
|00000bf0| 6c 65 72 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |ler to d|etermine|
|00000c00| 20 74 68 65 0d 09 74 65 | 6d 70 6f 72 61 72 79 20 | the..te|mporary |
|00000c10| 76 69 65 77 52 65 63 74 | 20 66 6f 72 20 74 68 65 |viewRect| for the|
|00000c20| 20 54 45 20 62 75 66 66 | 65 72 2e 0d 09 2a 2f 0d | TE buff|er...*/.|
|00000c30| 09 0d 09 54 45 48 61 6e | 64 6c 65 20 6d 61 63 62 |...TEHan|dle macb|
|00000c40| 75 66 66 65 72 3b 0d 09 | 52 65 63 74 20 6f 6c 64 |uffer;..|Rect old|
|00000c50| 76 69 65 77 2c 20 6f 6c | 64 64 65 73 74 3b 0d 09 |view, ol|ddest;..|
|00000c60| 57 69 6e 64 6f 77 50 74 | 72 20 6f 6c 64 70 6f 72 |WindowPt|r oldpor|
|00000c70| 74 3b 0d 09 0d 09 69 66 | 20 28 21 67 65 74 6d 61 |t;....if| (!getma|
|00000c80| 63 62 75 66 66 65 72 20 | 28 68 62 75 66 66 65 72 |cbuffer |(hbuffer|
|00000c90| 2c 20 26 6d 61 63 62 75 | 66 66 65 72 29 29 0d 09 |, &macbu|ffer))..|
|00000ca0| 09 72 65 74 75 72 6e 3b | 0d 09 09 0d 09 6f 6c 64 |.return;|.....old|
|00000cb0| 76 69 65 77 20 3d 20 28 | 2a 2a 6d 61 63 62 75 66 |view = (|**macbuf|
|00000cc0| 66 65 72 29 2e 76 69 65 | 77 52 65 63 74 3b 20 0d |fer).vie|wRect; .|
|00000cd0| 09 0d 09 6f 6c 64 64 65 | 73 74 20 3d 20 28 2a 2a |...oldde|st = (**|
|00000ce0| 6d 61 63 62 75 66 66 65 | 72 29 2e 64 65 73 74 52 |macbuffe|r).destR|
|00000cf0| 65 63 74 3b 20 0d 09 0d | 09 6f 6c 64 70 6f 72 74 |ect; ...|.oldport|
|00000d00| 20 3d 20 28 2a 2a 6d 61 | 63 62 75 66 66 65 72 29 | = (**ma|cbuffer)|
|00000d10| 2e 69 6e 50 6f 72 74 3b | 0d 09 0d 09 28 2a 2a 6d |.inPort;|....(**m|
|00000d20| 61 63 62 75 66 66 65 72 | 29 2e 76 69 65 77 52 65 |acbuffer|).viewRe|
|00000d30| 63 74 20 3d 20 72 70 6f | 72 74 3b 0d 09 0d 09 28 |ct = rpo|rt;....(|
|00000d40| 2a 2a 6d 61 63 62 75 66 | 66 65 72 29 2e 64 65 73 |**macbuf|fer).des|
|00000d50| 74 52 65 63 74 20 3d 20 | 72 70 6f 72 74 3b 0d 09 |tRect = |rport;..|
|00000d60| 0d 09 28 2a 2a 6d 61 63 | 62 75 66 66 65 72 29 2e |..(**mac|buffer).|
|00000d70| 69 6e 50 6f 72 74 20 3d | 20 77 3b 0d 09 0d 09 54 |inPort =| w;....T|
|00000d80| 45 55 70 64 61 74 65 20 | 28 26 72 70 6f 72 74 2c |EUpdate |(&rport,|
|00000d90| 20 6d 61 63 62 75 66 66 | 65 72 29 3b 0d 09 0d 09 | macbuff|er);....|
|00000da0| 28 2a 2a 6d 61 63 62 75 | 66 66 65 72 29 2e 76 69 |(**macbu|ffer).vi|
|00000db0| 65 77 52 65 63 74 20 3d | 20 6f 6c 64 76 69 65 77 |ewRect =| oldview|
|00000dc0| 3b 0d 09 0d 09 28 2a 2a | 6d 61 63 62 75 66 66 65 |;....(**|macbuffe|
|00000dd0| 72 29 2e 64 65 73 74 52 | 65 63 74 20 3d 20 6f 6c |r).destR|ect = ol|
|00000de0| 64 64 65 73 74 3b 0d 09 | 0d 09 28 2a 2a 6d 61 63 |ddest;..|..(**mac|
|00000df0| 62 75 66 66 65 72 29 2e | 69 6e 50 6f 72 74 20 3d |buffer).|inPort =|
|00000e00| 20 6f 6c 64 70 6f 72 74 | 3b 0d 09 7d 20 2f 2a 65 | oldport|;..} /*e|
|00000e10| 64 69 74 75 70 64 61 74 | 65 70 6f 72 74 2a 2f 0d |ditupdat|eport*/.|
|00000e20| 09 0d 09 0d 76 6f 69 64 | 20 65 64 69 74 61 63 74 |....void| editact|
|00000e30| 69 76 61 74 65 20 28 68 | 64 6c 65 64 69 74 72 65 |ivate (h|dleditre|
|00000e40| 63 6f 72 64 20 68 62 75 | 66 66 65 72 2c 20 62 6f |cord hbu|ffer, bo|
|00000e50| 6f 6c 65 61 6e 20 66 6c | 61 63 74 69 76 65 29 20 |olean fl|active) |
|00000e60| 7b 0d 09 0d 09 54 45 48 | 61 6e 64 6c 65 20 6d 61 |{....TEH|andle ma|
|00000e70| 63 62 75 66 66 65 72 3b | 0d 09 0d 09 69 66 20 28 |cbuffer;|....if (|
|00000e80| 21 67 65 74 6d 61 63 62 | 75 66 66 65 72 20 28 68 |!getmacb|uffer (h|
|00000e90| 62 75 66 66 65 72 2c 20 | 26 6d 61 63 62 75 66 66 |buffer, |&macbuff|
|00000ea0| 65 72 29 29 0d 09 09 72 | 65 74 75 72 6e 3b 0d 09 |er))...r|eturn;..|
|00000eb0| 09 0d 09 69 66 20 28 66 | 6c 61 63 74 69 76 65 29 |...if (f|lactive)|
|00000ec0| 0d 09 09 54 45 41 63 74 | 69 76 61 74 65 20 28 6d |...TEAct|ivate (m|
|00000ed0| 61 63 62 75 66 66 65 72 | 29 3b 0d 09 65 6c 73 65 |acbuffer|);..else|
|00000ee0| 0d 09 09 54 45 44 65 61 | 63 74 69 76 61 74 65 20 |...TEDea|ctivate |
|00000ef0| 28 6d 61 63 62 75 66 66 | 65 72 29 3b 0d 09 7d 20 |(macbuff|er);..} |
|00000f00| 2f 2a 65 64 69 74 75 70 | 64 61 74 65 2a 2f 0d 09 |/*editup|date*/..|
|00000f10| 0d 09 0d 76 6f 69 64 20 | 65 64 69 74 73 65 74 72 |...void |editsetr|
|00000f20| 65 63 74 20 28 68 64 6c | 65 64 69 74 72 65 63 6f |ect (hdl|editreco|
|00000f30| 72 64 20 68 62 75 66 66 | 65 72 2c 20 52 65 63 74 |rd hbuff|er, Rect|
|00000f40| 20 72 29 20 7b 0d 0d 09 | 54 45 48 61 6e 64 6c 65 | r) {...|TEHandle|
|00000f50| 20 6d 61 63 62 75 66 66 | 65 72 3b 0d 0d 09 69 66 | macbuff|er;...if|
|00000f60| 20 28 21 67 65 74 6d 61 | 63 62 75 66 66 65 72 20 | (!getma|cbuffer |
|00000f70| 28 68 62 75 66 66 65 72 | 2c 20 26 6d 61 63 62 75 |(hbuffer|, &macbu|
|00000f80| 66 66 65 72 29 29 0d 09 | 09 72 65 74 75 72 6e 3b |ffer))..|.return;|
|00000f90| 0d 09 09 0d 09 49 6e 73 | 65 74 52 65 63 74 20 28 |.....Ins|etRect (|
|00000fa0| 26 72 2c 20 74 65 78 74 | 68 6f 72 69 7a 69 6e 73 |&r, text|horizins|
|00000fb0| 65 74 2c 20 74 65 78 74 | 76 65 72 74 69 6e 73 65 |et, text|vertinse|
|00000fc0| 74 29 3b 0d 09 09 09 0d | 09 28 2a 2a 6d 61 63 62 |t);.....|.(**macb|
|00000fd0| 75 66 66 65 72 29 2e 76 | 69 65 77 52 65 63 74 20 |uffer).v|iewRect |
|00000fe0| 3d 20 72 3b 0d 09 0d 09 | 69 66 20 28 21 28 2a 2a |= r;....|if (!(**|
|00000ff0| 68 62 75 66 66 65 72 29 | 2e 66 6c 77 69 6e 64 6f |hbuffer)|.flwindo|
|00001000| 77 62 61 73 65 64 29 0d | 09 09 28 2a 2a 6d 61 63 |wbased).|..(**mac|
|00001010| 62 75 66 66 65 72 29 2e | 64 65 73 74 52 65 63 74 |buffer).|destRect|
|00001020| 20 3d 20 72 3b 0d 09 0d | 09 54 45 43 61 6c 54 65 | = r;...|.TECalTe|
|00001030| 78 74 20 28 6d 61 63 62 | 75 66 66 65 72 29 3b 0d |xt (macb|uffer);.|
|00001040| 09 0d 09 2f 2a 65 64 69 | 74 75 70 64 61 74 65 20 |.../*edi|tupdate |
|00001050| 28 68 62 75 66 66 65 72 | 29 3b 2a 2f 0d 09 7d 20 |(hbuffer|);*/..} |
|00001060| 2f 2a 65 64 69 74 73 65 | 74 72 65 63 74 2a 2f 0d |/*editse|trect*/.|
|00001070| 09 0d 09 0d 76 6f 69 64 | 20 65 64 69 74 73 65 74 |....void| editset|
|00001080| 66 6f 6e 74 20 28 68 64 | 6c 65 64 69 74 72 65 63 |font (hd|leditrec|
|00001090| 6f 72 64 20 68 62 75 66 | 66 65 72 2c 20 73 68 6f |ord hbuf|fer, sho|
|000010a0| 72 74 20 66 6f 6e 74 6e | 75 6d 2c 20 73 68 6f 72 |rt fontn|um, shor|
|000010b0| 74 20 66 6f 6e 74 73 69 | 7a 65 29 20 7b 0d 0d 09 |t fontsi|ze) {...|
|000010c0| 54 45 48 61 6e 64 6c 65 | 20 6d 61 63 62 75 66 66 |TEHandle| macbuff|
|000010d0| 65 72 3b 0d 0d 09 69 66 | 20 28 21 67 65 74 6d 61 |er;...if| (!getma|
|000010e0| 63 62 75 66 66 65 72 20 | 28 68 62 75 66 66 65 72 |cbuffer |(hbuffer|
|000010f0| 2c 20 26 6d 61 63 62 75 | 66 66 65 72 29 29 0d 09 |, &macbu|ffer))..|
|00001100| 09 72 65 74 75 72 6e 3b | 0d 09 09 0d 09 65 64 69 |.return;|.....edi|
|00001110| 74 70 72 65 73 63 72 6f | 6c 6c 20 28 68 62 75 66 |tprescro|ll (hbuf|
|00001120| 66 65 72 29 3b 0d 09 0d | 09 28 2a 2a 6d 61 63 62 |fer);...|.(**macb|
|00001130| 75 66 66 65 72 29 2e 74 | 78 46 6f 6e 74 20 3d 20 |uffer).t|xFont = |
|00001140| 66 6f 6e 74 6e 75 6d 3b | 0d 09 0d 09 28 2a 2a 6d |fontnum;|....(**m|
|00001150| 61 63 62 75 66 66 65 72 | 29 2e 74 78 53 69 7a 65 |acbuffer|).txSize|
|00001160| 20 3d 20 66 6f 6e 74 73 | 69 7a 65 3b 0d 09 0d 09 | = fonts|ize;....|
|00001170| 70 75 73 68 73 74 79 6c | 65 20 28 66 6f 6e 74 6e |pushstyl|e (fontn|
|00001180| 75 6d 2c 20 66 6f 6e 74 | 73 69 7a 65 2c 20 28 2a |um, font|size, (*|
|00001190| 2a 6d 61 63 62 75 66 66 | 65 72 29 2e 74 78 46 61 |*macbuff|er).txFa|
|000011a0| 63 65 29 3b 0d 09 0d 09 | 28 2a 2a 6d 61 63 62 75 |ce);....|(**macbu|
|000011b0| 66 66 65 72 29 2e 66 6f | 6e 74 41 73 63 65 6e 74 |ffer).fo|ntAscent|
|000011c0| 20 3d 20 67 6c 6f 62 61 | 6c 66 6f 6e 74 69 6e 66 | = globa|lfontinf|
|000011d0| 6f 2e 61 73 63 65 6e 74 | 3b 0d 09 0d 09 28 2a 2a |o.ascent|;....(**|
|000011e0| 6d 61 63 62 75 66 66 65 | 72 29 2e 6c 69 6e 65 48 |macbuffe|r).lineH|
|000011f0| 65 69 67 68 74 20 3d 20 | 67 6c 6f 62 61 6c 66 6f |eight = |globalfo|
|00001200| 6e 74 69 6e 66 6f 2e 61 | 73 63 65 6e 74 20 2b 20 |ntinfo.a|scent + |
|00001210| 67 6c 6f 62 61 6c 66 6f | 6e 74 69 6e 66 6f 2e 64 |globalfo|ntinfo.d|
|00001220| 65 73 63 65 6e 74 20 2b | 20 67 6c 6f 62 61 6c 66 |escent +| globalf|
|00001230| 6f 6e 74 69 6e 66 6f 2e | 6c 65 61 64 69 6e 67 3b |ontinfo.|leading;|
|00001240| 0d 09 0d 09 70 6f 70 73 | 74 79 6c 65 20 28 29 3b |....pops|tyle ();|
|00001250| 0d 09 09 0d 09 54 45 43 | 61 6c 54 65 78 74 20 28 |.....TEC|alText (|
|00001260| 6d 61 63 62 75 66 66 65 | 72 29 3b 0d 09 0d 09 65 |macbuffe|r);....e|
|00001270| 64 69 74 73 65 74 73 63 | 72 6f 6c 6c 76 61 6c 75 |ditsetsc|rollvalu|
|00001280| 65 73 20 28 68 62 75 66 | 66 65 72 29 3b 0d 09 0d |es (hbuf|fer);...|
|00001290| 09 28 2a 2a 68 62 75 66 | 66 65 72 29 2e 66 6c 73 |.(**hbuf|fer).fls|
|000012a0| 63 72 6f 6c 6c 65 64 20 | 3d 20 74 72 75 65 3b 0d |crolled |= true;.|
|000012b0| 09 7d 20 2f 2a 65 64 69 | 74 73 65 74 66 6f 6e 74 |.} /*edi|tsetfont|
|000012c0| 2a 2f 0d 09 0d 09 0d 76 | 6f 69 64 20 65 64 69 74 |*/.....v|oid edit|
|000012d0| 61 75 74 6f 73 63 72 6f | 6c 6c 20 28 68 64 6c 65 |autoscro|ll (hdle|
|000012e0| 64 69 74 72 65 63 6f 72 | 64 20 68 62 75 66 66 65 |ditrecor|d hbuffe|
|000012f0| 72 29 20 7b 0d 0d 09 54 | 45 48 61 6e 64 6c 65 20 |r) {...T|EHandle |
|00001300| 6d 61 63 62 75 66 66 65 | 72 3b 0d 0d 09 69 66 20 |macbuffe|r;...if |
|00001310| 28 21 67 65 74 6d 61 63 | 62 75 66 66 65 72 20 28 |(!getmac|buffer (|
|00001320| 68 62 75 66 66 65 72 2c | 20 26 6d 61 63 62 75 66 |hbuffer,| &macbuf|
|00001330| 66 65 72 29 29 0d 09 09 | 72 65 74 75 72 6e 3b 0d |fer))...|return;.|
|00001340| 09 09 0d 09 54 45 41 75 | 74 6f 56 69 65 77 20 28 |....TEAu|toView (|
|00001350| 74 72 75 65 2c 20 6d 61 | 63 62 75 66 66 65 72 29 |true, ma|cbuffer)|
|00001360| 3b 0d 09 7d 20 2f 2a 65 | 64 69 74 61 75 74 6f 73 |;..} /*e|ditautos|
|00001370| 63 72 6f 6c 6c 2a 2f 0d | 09 0d 09 0d 76 6f 69 64 |croll*/.|....void|
|00001380| 20 65 64 69 74 73 65 74 | 77 6f 72 64 77 72 61 70 | editset|wordwrap|
|00001390| 20 28 68 64 6c 65 64 69 | 74 72 65 63 6f 72 64 20 | (hdledi|trecord |
|000013a0| 68 62 75 66 66 65 72 2c | 20 62 6f 6f 6c 65 61 6e |hbuffer,| boolean|
|000013b0| 20 66 6c 29 20 7b 0d 09 | 0d 09 54 45 48 61 6e 64 | fl) {..|..TEHand|
|000013c0| 6c 65 20 6d 61 63 62 75 | 66 66 65 72 3b 0d 09 72 |le macbu|ffer;..r|
|000013d0| 65 67 69 73 74 65 72 20 | 73 68 6f 72 74 20 63 72 |egister |short cr|
|000013e0| 6f 6e 6c 79 3b 0d 0d 09 | 69 66 20 28 21 67 65 74 |only;...|if (!get|
|000013f0| 6d 61 63 62 75 66 66 65 | 72 20 28 68 62 75 66 66 |macbuffe|r (hbuff|
|00001400| 65 72 2c 20 26 6d 61 63 | 62 75 66 66 65 72 29 29 |er, &mac|buffer))|
|00001410| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 0d 09 69 66 |...retur|n;....if|
|00001420| 20 28 66 6c 29 0d 09 09 | 63 72 6f 6e 6c 79 20 3d | (fl)...|cronly =|
|00001430| 20 31 3b 20 2f 2a 77 6f | 72 64 2d 77 72 61 70 20 | 1; /*wo|rd-wrap |
|00001440| 6f 6e 2a 2f 0d 09 65 6c | 73 65 0d 09 09 63 72 6f |on*/..el|se...cro|
|00001450| 6e 6c 79 20 3d 20 2d 31 | 3b 20 2f 2a 6e 6f 20 77 |nly = -1|; /*no w|
|00001460| 6f 72 64 2d 77 72 61 70 | 2a 2f 0d 09 09 0d 09 28 |ord-wrap|*/.....(|
|00001470| 2a 2a 6d 61 63 62 75 66 | 66 65 72 29 2e 63 72 4f |**macbuf|fer).crO|
|00001480| 6e 6c 79 20 3d 20 63 72 | 6f 6e 6c 79 3b 20 0d 09 |nly = cr|only; ..|
|00001490| 7d 20 2f 2a 65 64 69 74 | 73 65 74 77 6f 72 64 77 |} /*edit|setwordw|
|000014a0| 72 61 70 2a 2f 0d 09 0d | 0d 76 6f 69 64 20 65 64 |rap*/...|.void ed|
|000014b0| 69 74 64 69 73 70 6f 73 | 65 20 28 68 64 6c 65 64 |itdispos|e (hdled|
|000014c0| 69 74 72 65 63 6f 72 64 | 20 68 62 75 66 66 65 72 |itrecord| hbuffer|
|000014d0| 29 20 7b 0d 09 0d 09 54 | 45 48 61 6e 64 6c 65 20 |) {....T|EHandle |
|000014e0| 6d 61 63 62 75 66 66 65 | 72 3b 0d 09 0d 09 69 66 |macbuffe|r;....if|
|000014f0| 20 28 21 67 65 74 6d 61 | 63 62 75 66 66 65 72 20 | (!getma|cbuffer |
|00001500| 28 68 62 75 66 66 65 72 | 2c 20 26 6d 61 63 62 75 |(hbuffer|, &macbu|
|00001510| 66 66 65 72 29 29 0d 09 | 09 72 65 74 75 72 6e 3b |ffer))..|.return;|
|00001520| 0d 09 0d 09 54 45 44 65 | 61 63 74 69 76 61 74 65 |....TEDe|activate|
|00001530| 20 28 6d 61 63 62 75 66 | 66 65 72 29 3b 20 2f 2a | (macbuf|fer); /*|
|00001540| 72 65 6d 6f 76 65 20 74 | 68 65 20 63 61 72 65 74 |remove t|he caret|
|00001550| 20 63 75 72 73 6f 72 2c | 20 6f 72 20 75 6e 68 69 | cursor,| or unhi|
|00001560| 67 68 6c 69 67 68 74 20 | 73 65 6c 65 63 74 69 6f |ghlight |selectio|
|00001570| 6e 2a 2f 0d 09 0d 09 54 | 45 44 69 73 70 6f 73 65 |n*/....T|EDispose|
|00001580| 20 28 6d 61 63 62 75 66 | 66 65 72 29 3b 0d 09 09 | (macbuf|fer);...|
|00001590| 0d 09 64 69 73 70 6f 73 | 65 68 61 6e 64 6c 65 20 |..dispos|ehandle |
|000015a0| 28 28 48 61 6e 64 6c 65 | 29 20 68 62 75 66 66 65 |((Handle|) hbuffe|
|000015b0| 72 29 3b 0d 09 7d 20 2f | 2a 65 64 69 74 64 69 73 |r);..} /|*editdis|
|000015c0| 70 6f 73 65 2a 2f 0d 0d | 0d 76 6f 69 64 20 65 64 |pose*/..|.void ed|
|000015d0| 69 74 64 72 61 77 74 65 | 78 74 20 28 62 69 67 73 |itdrawte|xt (bigs|
|000015e0| 74 72 69 6e 67 20 62 73 | 2c 20 52 65 63 74 20 72 |tring bs|, Rect r|
|000015f0| 2c 20 74 79 6a 75 73 74 | 69 66 69 63 61 74 69 6f |, tyjust|ificatio|
|00001600| 6e 20 6a 75 73 74 69 66 | 69 63 61 74 69 6f 6e 29 |n justif|ication)|
|00001610| 20 7b 0d 09 0d 09 49 6e | 73 65 74 52 65 63 74 20 | {....In|setRect |
|00001620| 28 26 72 2c 20 74 65 78 | 74 68 6f 72 69 7a 69 6e |(&r, tex|thorizin|
|00001630| 73 65 74 2c 20 74 65 78 | 74 76 65 72 74 69 6e 73 |set, tex|tvertins|
|00001640| 65 74 29 3b 0d 09 0d 09 | 54 65 78 74 42 6f 78 20 |et);....|TextBox |
|00001650| 28 26 62 73 20 5b 31 5d | 2c 20 73 74 72 69 6e 67 |(&bs [1]|, string|
|00001660| 6c 65 6e 67 74 68 20 28 | 62 73 29 2c 20 26 72 2c |length (|bs), &r,|
|00001670| 20 67 65 74 54 45 6a 75 | 73 74 69 66 69 63 61 74 | getTEju|stificat|
|00001680| 69 6f 6e 20 28 6a 75 73 | 74 69 66 69 63 61 74 69 |ion (jus|tificati|
|00001690| 6f 6e 29 29 3b 0d 09 7d | 20 2f 2a 65 64 69 74 64 |on));..}| /*editd|
|000016a0| 72 61 77 74 65 78 74 2a | 2f 0d 09 0d 0d 76 6f 69 |rawtext*|/....voi|
|000016b0| 64 20 65 64 69 74 64 72 | 61 77 74 65 78 74 68 61 |d editdr|awtextha|
|000016c0| 6e 64 6c 65 20 28 48 61 | 6e 64 6c 65 20 68 74 65 |ndle (Ha|ndle hte|
|000016d0| 78 74 2c 20 52 65 63 74 | 20 72 2c 20 74 79 6a 75 |xt, Rect| r, tyju|
|000016e0| 73 74 69 66 69 63 61 74 | 69 6f 6e 20 6a 75 73 74 |stificat|ion just|
|000016f0| 69 66 69 63 61 74 69 6f | 6e 29 20 7b 0d 09 0d 09 |ificatio|n) {....|
|00001700| 69 66 20 28 68 74 65 78 | 74 20 3d 3d 20 6e 69 6c |if (htex|t == nil|
|00001710| 29 0d 09 09 72 65 74 75 | 72 6e 3b 0d 09 0d 09 49 |)...retu|rn;....I|
|00001720| 6e 73 65 74 52 65 63 74 | 20 28 26 72 2c 20 74 65 |nsetRect| (&r, te|
|00001730| 78 74 68 6f 72 69 7a 69 | 6e 73 65 74 2c 20 74 65 |xthorizi|nset, te|
|00001740| 78 74 76 65 72 74 69 6e | 73 65 74 29 3b 0d 09 0d |xtvertin|set);...|
|00001750| 09 54 65 78 74 42 6f 78 | 20 28 2a 68 74 65 78 74 |.TextBox| (*htext|
|00001760| 2c 20 47 65 74 48 61 6e | 64 6c 65 53 69 7a 65 20 |, GetHan|dleSize |
|00001770| 28 68 74 65 78 74 29 2c | 20 26 72 2c 20 67 65 74 |(htext),| &r, get|
|00001780| 54 45 6a 75 73 74 69 66 | 69 63 61 74 69 6f 6e 20 |TEjustif|ication |
|00001790| 28 6a 75 73 74 69 66 69 | 63 61 74 69 6f 6e 29 29 |(justifi|cation))|
|000017a0| 3b 0d 09 7d 20 2f 2a 65 | 64 69 74 64 72 61 77 74 |;..} /*e|ditdrawt|
|000017b0| 65 78 74 68 61 6e 64 6c | 65 2a 2f 0d 09 0d 0d 76 |exthandl|e*/....v|
|000017c0| 6f 69 64 20 65 64 69 74 | 69 64 6c 65 20 28 68 64 |oid edit|idle (hd|
|000017d0| 6c 65 64 69 74 72 65 63 | 6f 72 64 20 68 62 75 66 |leditrec|ord hbuf|
|000017e0| 66 65 72 29 20 7b 0d 09 | 0d 09 54 45 48 61 6e 64 |fer) {..|..TEHand|
|000017f0| 6c 65 20 6d 61 63 62 75 | 66 66 65 72 3b 0d 09 0d |le macbu|ffer;...|
|00001800| 09 69 66 20 28 21 67 65 | 74 6d 61 63 62 75 66 66 |.if (!ge|tmacbuff|
|00001810| 65 72 20 28 68 62 75 66 | 66 65 72 2c 20 26 6d 61 |er (hbuf|fer, &ma|
|00001820| 63 62 75 66 66 65 72 29 | 29 0d 09 09 72 65 74 75 |cbuffer)|)...retu|
|00001830| 72 6e 3b 0d 09 0d 09 54 | 45 49 64 6c 65 20 28 6d |rn;....T|EIdle (m|
|00001840| 61 63 62 75 66 66 65 72 | 29 3b 0d 09 7d 20 2f 2a |acbuffer|);..} /*|
|00001850| 65 64 69 74 69 64 6c 65 | 2a 2f 0d 09 0d 09 0d 76 |editidle|*/.....v|
|00001860| 6f 69 64 20 65 64 69 74 | 63 75 74 20 28 68 64 6c |oid edit|cut (hdl|
|00001870| 65 64 69 74 72 65 63 6f | 72 64 20 68 62 75 66 66 |editreco|rd hbuff|
|00001880| 65 72 29 20 7b 0d 09 0d | 09 54 45 48 61 6e 64 6c |er) {...|.TEHandl|
|00001890| 65 20 6d 61 63 62 75 66 | 66 65 72 3b 0d 09 0d 09 |e macbuf|fer;....|
|000018a0| 69 66 20 28 21 67 65 74 | 6d 61 63 62 75 66 66 65 |if (!get|macbuffe|
|000018b0| 72 20 28 68 62 75 66 66 | 65 72 2c 20 26 6d 61 63 |r (hbuff|er, &mac|
|000018c0| 62 75 66 66 65 72 29 29 | 0d 09 09 72 65 74 75 72 |buffer))|...retur|
|000018d0| 6e 3b 0d 0d 09 65 64 69 | 74 70 72 65 73 63 72 6f |n;...edi|tprescro|
|000018e0| 6c 6c 20 28 68 62 75 66 | 66 65 72 29 3b 0d 09 0d |ll (hbuf|fer);...|
|000018f0| 09 54 45 43 75 74 20 28 | 6d 61 63 62 75 66 66 65 |.TECut (|macbuffe|
|00001900| 72 29 3b 0d 09 0d 09 65 | 64 69 74 73 65 74 73 63 |r);....e|ditsetsc|
|00001910| 72 6f 6c 6c 76 61 6c 75 | 65 73 20 28 68 62 75 66 |rollvalu|es (hbuf|
|00001920| 66 65 72 29 3b 0d 09 7d | 20 2f 2a 65 64 69 74 63 |fer);..}| /*editc|
|00001930| 75 74 2a 2f 0d 0d 0d 76 | 6f 69 64 20 65 64 69 74 |ut*/...v|oid edit|
|00001940| 63 6f 70 79 20 28 68 64 | 6c 65 64 69 74 72 65 63 |copy (hd|leditrec|
|00001950| 6f 72 64 20 68 62 75 66 | 66 65 72 29 20 7b 0d 09 |ord hbuf|fer) {..|
|00001960| 0d 09 54 45 48 61 6e 64 | 6c 65 20 6d 61 63 62 75 |..TEHand|le macbu|
|00001970| 66 66 65 72 3b 0d 09 0d | 09 69 66 20 28 21 67 65 |ffer;...|.if (!ge|
|00001980| 74 6d 61 63 62 75 66 66 | 65 72 20 28 68 62 75 66 |tmacbuff|er (hbuf|
|00001990| 66 65 72 2c 20 26 6d 61 | 63 62 75 66 66 65 72 29 |fer, &ma|cbuffer)|
|000019a0| 29 0d 09 09 72 65 74 75 | 72 6e 3b 0d 0d 09 54 45 |)...retu|rn;...TE|
|000019b0| 43 6f 70 79 20 28 6d 61 | 63 62 75 66 66 65 72 29 |Copy (ma|cbuffer)|
|000019c0| 3b 0d 09 7d 20 2f 2a 65 | 64 69 74 63 6f 70 79 2a |;..} /*e|ditcopy*|
|000019d0| 2f 0d 0d 0d 76 6f 69 64 | 20 65 64 69 74 70 61 73 |/...void| editpas|
|000019e0| 74 65 20 28 68 64 6c 65 | 64 69 74 72 65 63 6f 72 |te (hdle|ditrecor|
|000019f0| 64 20 68 62 75 66 66 65 | 72 29 20 7b 0d 09 0d 09 |d hbuffe|r) {....|
|00001a00| 54 45 48 61 6e 64 6c 65 | 20 6d 61 63 62 75 66 66 |TEHandle| macbuff|
|00001a10| 65 72 3b 0d 09 0d 09 69 | 66 20 28 21 67 65 74 6d |er;....i|f (!getm|
|00001a20| 61 63 62 75 66 66 65 72 | 20 28 68 62 75 66 66 65 |acbuffer| (hbuffe|
|00001a30| 72 2c 20 26 6d 61 63 62 | 75 66 66 65 72 29 29 0d |r, &macb|uffer)).|
|00001a40| 09 09 72 65 74 75 72 6e | 3b 0d 0d 09 65 64 69 74 |..return|;...edit|
|00001a50| 70 72 65 73 63 72 6f 6c | 6c 20 28 68 62 75 66 66 |prescrol|l (hbuff|
|00001a60| 65 72 29 3b 0d 09 0d 09 | 54 45 50 61 73 74 65 20 |er);....|TEPaste |
|00001a70| 28 6d 61 63 62 75 66 66 | 65 72 29 3b 0d 09 0d 09 |(macbuff|er);....|
|00001a80| 65 64 69 74 73 65 74 73 | 63 72 6f 6c 6c 76 61 6c |editsets|crollval|
|00001a90| 75 65 73 20 28 68 62 75 | 66 66 65 72 29 3b 0d 09 |ues (hbu|ffer);..|
|00001aa0| 7d 20 2f 2a 65 64 69 74 | 70 61 73 74 65 2a 2f 0d |} /*edit|paste*/.|
|00001ab0| 09 0d 09 0d 62 6f 6f 6c | 65 61 6e 20 65 64 69 74 |....bool|ean edit|
|00001ac0| 67 65 74 74 65 78 74 20 | 28 68 62 75 66 66 65 72 |gettext |(hbuffer|
|00001ad0| 2c 20 62 73 29 20 68 64 | 6c 65 64 69 74 72 65 63 |, bs) hd|leditrec|
|00001ae0| 6f 72 64 20 68 62 75 66 | 66 65 72 3b 20 62 69 67 |ord hbuf|fer; big|
|00001af0| 73 74 72 69 6e 67 20 62 | 73 3b 20 7b 0d 0d 09 54 |string b|s; {...T|
|00001b00| 45 48 61 6e 64 6c 65 20 | 6d 61 63 62 75 66 66 65 |EHandle |macbuffe|
|00001b10| 72 3b 0d 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |r;..regi|ster int|
|00001b20| 20 6c 65 6e 3b 0d 09 0d | 09 73 65 74 73 74 72 69 | len;...|.setstri|
|00001b30| 6e 67 6c 65 6e 67 74 68 | 20 28 62 73 2c 20 30 29 |nglength| (bs, 0)|
|00001b40| 3b 0d 09 0d 09 69 66 20 | 28 21 67 65 74 6d 61 63 |;....if |(!getmac|
|00001b50| 62 75 66 66 65 72 20 28 | 68 62 75 66 66 65 72 2c |buffer (|hbuffer,|
|00001b60| 20 26 6d 61 63 62 75 66 | 66 65 72 29 29 0d 09 09 | &macbuf|fer))...|
|00001b70| 72 65 74 75 72 6e 20 28 | 66 61 6c 73 65 29 3b 0d |return (|false);.|
|00001b80| 0d 09 6c 65 6e 20 3d 20 | 28 2a 2a 6d 61 63 62 75 |..len = |(**macbu|
|00001b90| 66 66 65 72 29 2e 74 65 | 4c 65 6e 67 74 68 3b 0d |ffer).te|Length;.|
|00001ba0| 09 0d 09 73 65 74 73 74 | 72 69 6e 67 6c 65 6e 67 |...setst|ringleng|
|00001bb0| 74 68 20 28 62 73 2c 20 | 6c 65 6e 29 3b 0d 09 09 |th (bs, |len);...|
|00001bc0| 09 0d 09 6d 6f 76 65 6c | 65 66 74 20 28 2a 28 2a |...movel|eft (*(*|
|00001bd0| 2a 6d 61 63 62 75 66 66 | 65 72 29 2e 68 54 65 78 |*macbuff|er).hTex|
|00001be0| 74 2c 20 26 62 73 20 5b | 31 5d 2c 20 28 6c 6f 6e |t, &bs [|1], (lon|
|00001bf0| 67 29 20 6c 65 6e 29 3b | 20 0d 09 0d 09 72 65 74 |g) len);| ....ret|
|00001c00| 75 72 6e 20 28 74 72 75 | 65 29 3b 0d 09 7d 20 2f |urn (tru|e);..} /|
|00001c10| 2a 65 64 69 74 67 65 74 | 74 65 78 74 2a 2f 0d 0d |*editget|text*/..|
|00001c20| 0d 76 6f 69 64 20 65 64 | 69 74 6b 65 79 73 74 72 |.void ed|itkeystr|
|00001c30| 6f 6b 65 20 28 63 68 61 | 72 20 63 68 6b 62 2c 20 |oke (cha|r chkb, |
|00001c40| 68 64 6c 65 64 69 74 72 | 65 63 6f 72 64 20 68 62 |hdleditr|ecord hb|
|00001c50| 75 66 66 65 72 29 20 7b | 0d 0d 09 54 45 48 61 6e |uffer) {|...TEHan|
|00001c60| 64 6c 65 20 6d 61 63 62 | 75 66 66 65 72 3b 0d 09 |dle macb|uffer;..|
|00001c70| 0d 09 69 66 20 28 21 67 | 65 74 6d 61 63 62 75 66 |..if (!g|etmacbuf|
|00001c80| 66 65 72 20 28 68 62 75 | 66 66 65 72 2c 20 26 6d |fer (hbu|ffer, &m|
|00001c90| 61 63 62 75 66 66 65 72 | 29 29 0d 09 09 72 65 74 |acbuffer|))...ret|
|00001ca0| 75 72 6e 3b 0d 0d 09 65 | 64 69 74 70 72 65 73 63 |urn;...e|ditpresc|
|00001cb0| 72 6f 6c 6c 20 28 68 62 | 75 66 66 65 72 29 3b 0d |roll (hb|uffer);.|
|00001cc0| 09 0d 09 54 45 4b 65 79 | 20 28 63 68 6b 62 2c 20 |...TEKey| (chkb, |
|00001cd0| 6d 61 63 62 75 66 66 65 | 72 29 3b 0d 09 0d 09 65 |macbuffe|r);....e|
|00001ce0| 64 69 74 73 65 74 73 63 | 72 6f 6c 6c 76 61 6c 75 |ditsetsc|rollvalu|
|00001cf0| 65 73 20 28 68 62 75 66 | 66 65 72 29 3b 0d 09 7d |es (hbuf|fer);..}|
|00001d00| 20 2f 2a 65 64 69 74 6b | 65 79 73 74 72 6f 6b 65 | /*editk|eystroke|
|00001d10| 2a 2f 0d 09 0d 09 0d 76 | 6f 69 64 20 65 64 69 74 |*/.....v|oid edit|
|00001d20| 63 6c 69 63 6b 20 28 50 | 6f 69 6e 74 20 70 74 2c |click (P|oint pt,|
|00001d30| 20 62 6f 6f 6c 65 61 6e | 20 66 6c 73 68 69 66 74 | boolean| flshift|
|00001d40| 6b 65 79 2c 20 68 64 6c | 65 64 69 74 72 65 63 6f |key, hdl|editreco|
|00001d50| 72 64 20 68 62 75 66 66 | 65 72 29 20 7b 0d 0d 09 |rd hbuff|er) {...|
|00001d60| 54 45 48 61 6e 64 6c 65 | 20 6d 61 63 62 75 66 66 |TEHandle| macbuff|
|00001d70| 65 72 3b 0d 09 0d 09 69 | 66 20 28 21 67 65 74 6d |er;....i|f (!getm|
|00001d80| 61 63 62 75 66 66 65 72 | 20 28 68 62 75 66 66 65 |acbuffer| (hbuffe|
|00001d90| 72 2c 20 26 6d 61 63 62 | 75 66 66 65 72 29 29 0d |r, &macb|uffer)).|
|00001da0| 09 09 72 65 74 75 72 6e | 3b 0d 09 09 0d 09 65 64 |..return|;.....ed|
|00001db0| 69 74 70 72 65 73 63 72 | 6f 6c 6c 20 28 68 62 75 |itprescr|oll (hbu|
|00001dc0| 66 66 65 72 29 3b 0d 0d | 09 70 75 73 68 63 6c 69 |ffer);..|.pushcli|
|00001dd0| 70 20 28 28 2a 2a 6d 61 | 63 62 75 66 66 65 72 29 |p ((**ma|cbuffer)|
|00001de0| 2e 76 69 65 77 52 65 63 | 74 29 3b 0d 09 0d 09 54 |.viewRec|t);....T|
|00001df0| 45 43 6c 69 63 6b 20 28 | 70 74 2c 20 66 6c 73 68 |EClick (|pt, flsh|
|00001e00| 69 66 74 6b 65 79 2c 20 | 6d 61 63 62 75 66 66 65 |iftkey, |macbuffe|
|00001e10| 72 29 3b 0d 09 0d 09 70 | 6f 70 63 6c 69 70 20 28 |r);....p|opclip (|
|00001e20| 29 3b 0d 09 0d 09 65 64 | 69 74 73 65 74 73 63 72 |);....ed|itsetscr|
|00001e30| 6f 6c 6c 76 61 6c 75 65 | 73 20 28 68 62 75 66 66 |ollvalue|s (hbuff|
|00001e40| 65 72 29 3b 0d 09 7d 20 | 2f 2a 65 64 69 74 63 6c |er);..} |/*editcl|
|00001e50| 69 63 6b 2a 2f 0d 09 0d | 0d 62 6f 6f 6c 65 61 6e |ick*/...|.boolean|
|00001e60| 20 65 64 69 74 73 65 74 | 73 65 6c 65 63 74 69 6f | editset|selectio|
|00001e70| 6e 20 28 68 64 6c 65 64 | 69 74 72 65 63 6f 72 64 |n (hdled|itrecord|
|00001e80| 20 68 62 75 66 66 65 72 | 2c 20 73 68 6f 72 74 20 | hbuffer|, short |
|00001e90| 73 65 6c 73 74 61 72 74 | 2c 20 73 68 6f 72 74 20 |selstart|, short |
|00001ea0| 73 65 6c 65 6e 64 29 20 | 7b 0d 0d 09 54 45 48 61 |selend) |{...TEHa|
|00001eb0| 6e 64 6c 65 20 6d 61 63 | 62 75 66 66 65 72 3b 0d |ndle mac|buffer;.|
|00001ec0| 09 0d 09 69 66 20 28 21 | 67 65 74 6d 61 63 62 75 |...if (!|getmacbu|
|00001ed0| 66 66 65 72 20 28 68 62 | 75 66 66 65 72 2c 20 26 |ffer (hb|uffer, &|
|00001ee0| 6d 61 63 62 75 66 66 65 | 72 29 29 0d 09 09 72 65 |macbuffe|r))...re|
|00001ef0| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 09 |turn (fa|lse);...|
|00001f00| 0d 09 65 64 69 74 70 72 | 65 73 63 72 6f 6c 6c 20 |..editpr|escroll |
|00001f10| 28 68 62 75 66 66 65 72 | 29 3b 0d 0d 09 54 45 53 |(hbuffer|);...TES|
|00001f20| 65 74 53 65 6c 65 63 74 | 20 28 73 65 6c 73 74 61 |etSelect| (selsta|
|00001f30| 72 74 2c 20 73 65 6c 65 | 6e 64 2c 20 6d 61 63 62 |rt, sele|nd, macb|
|00001f40| 75 66 66 65 72 29 3b 0d | 09 0d 09 65 64 69 74 73 |uffer);.|...edits|
|00001f50| 65 74 73 63 72 6f 6c 6c | 76 61 6c 75 65 73 20 28 |etscroll|values (|
|00001f60| 68 62 75 66 66 65 72 29 | 3b 0d 09 09 0d 09 72 65 |hbuffer)|;.....re|
|00001f70| 74 75 72 6e 20 28 74 72 | 75 65 29 3b 0d 09 7d 20 |turn (tr|ue);..} |
|00001f80| 2f 2a 65 64 69 74 67 65 | 74 73 65 6c 65 63 74 69 |/*editge|tselecti|
|00001f90| 6f 6e 2a 2f 0d 0d 0d 76 | 6f 69 64 20 65 64 69 74 |on*/...v|oid edit|
|00001fa0| 73 65 6c 65 63 74 61 6c | 6c 20 28 68 64 6c 65 64 |selectal|l (hdled|
|00001fb0| 69 74 72 65 63 6f 72 64 | 20 68 62 75 66 66 65 72 |itrecord| hbuffer|
|00001fc0| 29 20 7b 0d 09 0d 09 65 | 64 69 74 73 65 74 73 65 |) {....e|ditsetse|
|00001fd0| 6c 65 63 74 69 6f 6e 20 | 28 68 62 75 66 66 65 72 |lection |(hbuffer|
|00001fe0| 2c 20 30 2c 20 33 32 37 | 36 37 29 3b 0d 09 7d 20 |, 0, 327|67);..} |
|00001ff0| 2f 2a 65 64 69 74 73 65 | 6c 65 63 74 61 6c 6c 2a |/*editse|lectall*|
|00002000| 2f 0d 09 0d 0d 62 6f 6f | 6c 65 61 6e 20 65 64 69 |/....boo|lean edi|
|00002010| 74 67 65 74 73 65 6c 65 | 63 74 69 6f 6e 20 28 68 |tgetsele|ction (h|
|00002020| 64 6c 65 64 69 74 72 65 | 63 6f 72 64 20 68 62 75 |dleditre|cord hbu|
|00002030| 66 66 65 72 2c 20 73 68 | 6f 72 74 20 2a 73 65 6c |ffer, sh|ort *sel|
|00002040| 73 74 61 72 74 2c 20 73 | 68 6f 72 74 20 2a 73 65 |start, s|hort *se|
|00002050| 6c 65 6e 64 29 20 7b 0d | 0d 09 54 45 48 61 6e 64 |lend) {.|..TEHand|
|00002060| 6c 65 20 6d 61 63 62 75 | 66 66 65 72 3b 0d 09 0d |le macbu|ffer;...|
|00002070| 09 69 66 20 28 21 67 65 | 74 6d 61 63 62 75 66 66 |.if (!ge|tmacbuff|
|00002080| 65 72 20 28 68 62 75 66 | 66 65 72 2c 20 26 6d 61 |er (hbuf|fer, &ma|
|00002090| 63 62 75 66 66 65 72 29 | 29 0d 09 09 72 65 74 75 |cbuffer)|)...retu|
|000020a0| 72 6e 20 28 66 61 6c 73 | 65 29 3b 0d 09 09 0d 09 |rn (fals|e);.....|
|000020b0| 2a 73 65 6c 73 74 61 72 | 74 20 3d 20 28 2a 2a 6d |*selstar|t = (**m|
|000020c0| 61 63 62 75 66 66 65 72 | 29 2e 73 65 6c 53 74 61 |acbuffer|).selSta|
|000020d0| 72 74 3b 0d 09 0d 09 2a | 73 65 6c 65 6e 64 20 3d |rt;....*|selend =|
|000020e0| 20 28 2a 2a 6d 61 63 62 | 75 66 66 65 72 29 2e 73 | (**macb|uffer).s|
|000020f0| 65 6c 45 6e 64 3b 0d 09 | 0d 09 72 65 74 75 72 6e |elEnd;..|..return|
|00002100| 20 28 74 72 75 65 29 3b | 0d 09 7d 20 2f 2a 65 64 | (true);|..} /*ed|
|00002110| 69 74 67 65 74 73 65 6c | 65 63 74 69 6f 6e 2a 2f |itgetsel|ection*/|
|00002120| 0d 0d 0d 62 6f 6f 6c 65 | 61 6e 20 65 64 69 74 70 |...boole|an editp|
|00002130| 6f 69 6e 74 69 6e 72 65 | 63 74 20 28 50 6f 69 6e |ointinre|ct (Poin|
|00002140| 74 20 70 74 2c 20 68 64 | 6c 65 64 69 74 72 65 63 |t pt, hd|leditrec|
|00002150| 6f 72 64 20 68 62 75 66 | 66 65 72 29 20 7b 0d 0d |ord hbuf|fer) {..|
|00002160| 09 54 45 48 61 6e 64 6c | 65 20 6d 61 63 62 75 66 |.TEHandl|e macbuf|
|00002170| 66 65 72 3b 0d 09 0d 09 | 69 66 20 28 21 67 65 74 |fer;....|if (!get|
|00002180| 6d 61 63 62 75 66 66 65 | 72 20 28 68 62 75 66 66 |macbuffe|r (hbuff|
|00002190| 65 72 2c 20 26 6d 61 63 | 62 75 66 66 65 72 29 29 |er, &mac|buffer))|
|000021a0| 0d 09 09 72 65 74 75 72 | 6e 20 28 66 61 6c 73 65 |...retur|n (false|
|000021b0| 29 3b 0d 0d 09 72 65 74 | 75 72 6e 20 28 50 74 49 |);...ret|urn (PtI|
|000021c0| 6e 52 65 63 74 20 28 70 | 74 2c 20 26 28 2a 2a 6d |nRect (p|t, &(**m|
|000021d0| 61 63 62 75 66 66 65 72 | 29 2e 76 69 65 77 52 65 |acbuffer|).viewRe|
|000021e0| 63 74 29 29 3b 0d 09 7d | 20 2f 2a 65 64 69 74 70 |ct));..}| /*editp|
|000021f0| 6f 69 6e 74 69 6e 72 65 | 63 74 2a 2f 0d 09 0d 0d |ointinre|ct*/....|
|00002200| 62 6f 6f 6c 65 61 6e 20 | 65 64 69 74 72 65 70 6c |boolean |editrepl|
|00002210| 61 63 65 20 28 62 69 67 | 73 74 72 69 6e 67 20 62 |ace (big|string b|
|00002220| 73 2c 20 68 64 6c 65 64 | 69 74 72 65 63 6f 72 64 |s, hdled|itrecord|
|00002230| 20 68 62 75 66 66 65 72 | 29 20 7b 0d 0d 09 54 45 | hbuffer|) {...TE|
|00002240| 48 61 6e 64 6c 65 20 6d | 61 63 62 75 66 66 65 72 |Handle m|acbuffer|
|00002250| 3b 0d 09 0d 09 69 66 20 | 28 21 67 65 74 6d 61 63 |;....if |(!getmac|
|00002260| 62 75 66 66 65 72 20 28 | 68 62 75 66 66 65 72 2c |buffer (|hbuffer,|
|00002270| 20 26 6d 61 63 62 75 66 | 66 65 72 29 29 0d 09 09 | &macbuf|fer))...|
|00002280| 72 65 74 75 72 6e 20 28 | 66 61 6c 73 65 29 3b 0d |return (|false);.|
|00002290| 09 0d 09 65 64 69 74 70 | 72 65 73 63 72 6f 6c 6c |...editp|rescroll|
|000022a0| 20 28 68 62 75 66 66 65 | 72 29 3b 0d 09 0d 09 69 | (hbuffe|r);....i|
|000022b0| 66 20 28 28 2a 2a 6d 61 | 63 62 75 66 66 65 72 29 |f ((**ma|cbuffer)|
|000022c0| 2e 73 65 6c 53 74 61 72 | 74 20 21 3d 20 28 2a 2a |.selStar|t != (**|
|000022d0| 6d 61 63 62 75 66 66 65 | 72 29 2e 73 65 6c 45 6e |macbuffe|r).selEn|
|000022e0| 64 29 0d 09 09 54 45 44 | 65 6c 65 74 65 20 28 6d |d)...TED|elete (m|
|000022f0| 61 63 62 75 66 66 65 72 | 29 3b 0d 09 0d 09 54 45 |acbuffer|);....TE|
|00002300| 49 6e 73 65 72 74 20 28 | 26 62 73 20 5b 31 5d 2c |Insert (|&bs [1],|
|00002310| 20 73 74 72 69 6e 67 6c | 65 6e 67 74 68 20 28 62 | stringl|ength (b|
|00002320| 73 29 2c 20 6d 61 63 62 | 75 66 66 65 72 29 3b 0d |s), macb|uffer);.|
|00002330| 09 0d 09 65 64 69 74 73 | 65 74 73 63 72 6f 6c 6c |...edits|etscroll|
|00002340| 76 61 6c 75 65 73 20 28 | 68 62 75 66 66 65 72 29 |values (|hbuffer)|
|00002350| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |;....ret|urn (tru|
|00002360| 65 29 3b 20 2f 2a 54 45 | 20 67 69 76 65 73 20 6e |e); /*TE| gives n|
|00002370| 6f 20 77 61 79 20 74 6f | 20 72 65 74 75 72 6e 20 |o way to| return |
|00002380| 61 6e 20 65 72 72 6f 72 | 2a 2f 0d 09 7d 20 2f 2a |an error|*/..} /*|
|00002390| 65 64 69 74 72 65 70 6c | 61 63 65 2a 2f 0d 09 0d |editrepl|ace*/...|
|000023a0| 09 0d 76 6f 69 64 20 65 | 64 69 74 73 65 74 6a 75 |..void e|ditsetju|
|000023b0| 73 74 69 66 69 63 61 74 | 69 6f 6e 20 28 74 79 6a |stificat|ion (tyj|
|000023c0| 75 73 74 69 66 69 63 61 | 74 69 6f 6e 20 6a 75 73 |ustifica|tion jus|
|000023d0| 74 69 66 69 63 61 74 69 | 6f 6e 2c 20 68 64 6c 65 |tificati|on, hdle|
|000023e0| 64 69 74 72 65 63 6f 72 | 64 20 68 62 75 66 66 65 |ditrecor|d hbuffe|
|000023f0| 72 29 20 7b 0d 0d 09 54 | 45 48 61 6e 64 6c 65 20 |r) {...T|EHandle |
|00002400| 6d 61 63 62 75 66 66 65 | 72 3b 0d 09 0d 09 69 66 |macbuffe|r;....if|
|00002410| 20 28 21 67 65 74 6d 61 | 63 62 75 66 66 65 72 20 | (!getma|cbuffer |
|00002420| 28 68 62 75 66 66 65 72 | 2c 20 26 6d 61 63 62 75 |(hbuffer|, &macbu|
|00002430| 66 66 65 72 29 29 0d 09 | 09 72 65 74 75 72 6e 3b |ffer))..|.return;|
|00002440| 0d 09 0d 09 54 45 53 65 | 74 4a 75 73 74 20 28 67 |....TESe|tJust (g|
|00002450| 65 74 54 45 6a 75 73 74 | 69 66 69 63 61 74 69 6f |etTEjust|ificatio|
|00002460| 6e 20 28 6a 75 73 74 69 | 66 69 63 61 74 69 6f 6e |n (justi|fication|
|00002470| 29 2c 20 6d 61 63 62 75 | 66 66 65 72 29 3b 0d 09 |), macbu|ffer);..|
|00002480| 7d 20 2f 2a 65 64 69 74 | 73 65 74 6a 75 73 74 69 |} /*edit|setjusti|
|00002490| 66 69 63 61 74 69 6f 6e | 2a 2f 0d 0d 0d 76 6f 69 |fication|*/...voi|
|000024a0| 64 20 65 64 69 74 67 65 | 74 73 69 7a 65 20 28 48 |d editge|tsize (H|
|000024b0| 61 6e 64 6c 65 20 68 74 | 65 78 74 2c 20 73 68 6f |andle ht|ext, sho|
|000024c0| 72 74 20 2a 68 65 69 67 | 68 74 2c 20 73 68 6f 72 |rt *heig|ht, shor|
|000024d0| 74 20 2a 77 69 64 74 68 | 29 20 7b 0d 09 0d 09 2f |t *width|) {..../|
|000024e0| 2a 0d 09 72 65 74 75 72 | 6e 20 74 68 65 20 73 69 |*..retur|n the si|
|000024f0| 7a 65 20 6f 66 20 61 20 | 72 65 63 74 61 6e 67 6c |ze of a |rectangl|
|00002500| 65 20 74 68 61 74 20 63 | 6f 75 6c 64 20 63 6f 6e |e that c|ould con|
|00002510| 74 61 69 6e 20 74 68 65 | 20 69 6e 64 69 63 61 74 |tain the| indicat|
|00002520| 65 64 20 73 74 72 69 6e | 67 0d 09 6f 62 73 65 72 |ed strin|g..obser|
|00002530| 76 69 6e 67 20 74 68 65 | 20 64 65 66 61 75 6c 74 |ving the| default|
|00002540| 73 20 66 6f 72 20 69 6e | 73 65 74 20 62 6f 74 68 |s for in|set both|
|00002550| 20 76 65 72 74 69 63 61 | 6c 6c 79 20 61 6e 64 20 | vertica|lly and |
|00002560| 68 6f 72 69 7a 6f 6e 74 | 61 6c 6c 79 2c 20 61 6e |horizont|ally, an|
|00002570| 64 20 0d 09 61 20 6d 69 | 6e 69 6d 75 6d 20 77 69 |d ..a mi|nimum wi|
|00002580| 64 74 68 20 66 6f 72 20 | 74 65 78 74 20 64 69 73 |dth for |text dis|
|00002590| 70 6c 61 79 2e 0d 09 0d | 09 61 73 73 75 6d 65 73 |play....|.assumes|
|000025a0| 20 74 68 61 74 20 74 68 | 65 20 66 6f 6e 74 2f 73 | that th|e font/s|
|000025b0| 69 7a 65 2f 73 74 79 6c | 65 20 69 6e 66 6f 20 61 |ize/styl|e info a|
|000025c0| 72 65 20 63 6f 72 72 65 | 63 74 20 69 6e 20 67 6c |re corre|ct in gl|
|000025d0| 6f 62 61 6c 66 6f 6e 74 | 69 6e 66 6f 2e 0d 09 0d |obalfont|info....|
|000025e0| 09 38 2f 38 2f 39 32 20 | 44 57 3a 20 75 70 67 72 |.8/8/92 |DW: upgr|
|000025f0| 61 64 65 20 74 6f 20 6e | 6f 74 20 75 73 65 20 61 |ade to n|ot use a|
|00002600| 20 62 69 67 73 74 72 69 | 6e 67 20 74 6f 20 68 6f | bigstri|ng to ho|
|00002610| 6c 64 20 74 68 65 20 74 | 65 78 74 20 74 6f 20 62 |ld the t|ext to b|
|00002620| 65 20 6d 65 61 73 75 72 | 65 64 2e 0d 09 77 65 20 |e measur|ed...we |
|00002630| 77 65 72 65 20 65 6e 63 | 6f 75 6e 74 65 72 69 6e |were enc|ounterin|
|00002640| 67 20 6c 69 6e 65 73 20 | 74 68 61 74 20 77 65 72 |g lines |that wer|
|00002650| 65 20 6c 6f 6e 67 65 72 | 20 74 68 61 6e 20 32 35 |e longer| than 25|
|00002660| 35 20 63 68 61 72 73 2e | 0d 09 2a 2f 0d 09 0d 09 |5 chars.|..*/....|
|00002670| 6c 6f 6e 67 20 74 65 78 | 74 6c 65 6e 67 74 68 3b |long tex|tlength;|
|00002680| 0d 09 6c 6f 6e 67 20 69 | 3b 0d 09 73 68 6f 72 74 |..long i|;..short|
|00002690| 20 63 74 6c 69 6e 65 73 | 20 3d 20 31 3b 0d 09 73 | ctlines| = 1;..s|
|000026a0| 68 6f 72 74 20 6d 61 78 | 77 69 64 74 68 20 3d 20 |hort max|width = |
|000026b0| 30 3b 0d 09 73 68 6f 72 | 74 20 76 65 72 74 70 69 |0;..shor|t vertpi|
|000026c0| 78 65 6c 73 3b 0d 09 73 | 68 6f 72 74 20 69 78 6c |xels;..s|hort ixl|
|000026d0| 69 6e 65 73 74 61 72 74 | 20 3d 20 30 2c 20 6c 69 |inestart| = 0, li|
|000026e0| 6e 65 6c 65 6e 67 74 68 | 20 3d 20 30 3b 0d 09 0d |nelength| = 0;...|
|000026f0| 09 74 65 78 74 6c 65 6e | 67 74 68 20 3d 20 47 65 |.textlen|gth = Ge|
|00002700| 74 48 61 6e 64 6c 65 53 | 69 7a 65 20 28 68 74 65 |tHandleS|ize (hte|
|00002710| 78 74 29 3b 0d 09 09 0d | 09 66 6f 72 20 28 69 20 |xt);....|.for (i |
|00002720| 3d 20 30 3b 20 69 20 3c | 3d 20 74 65 78 74 6c 65 |= 0; i <|= textle|
|00002730| 6e 67 74 68 3b 20 69 2b | 2b 29 20 7b 0d 09 09 0d |ngth; i+|+) {....|
|00002740| 09 09 63 68 61 72 20 63 | 68 20 3d 20 28 2a 68 74 |..char c|h = (*ht|
|00002750| 65 78 74 29 20 5b 69 5d | 3b 0d 09 09 09 0d 09 09 |ext) [i]|;.......|
|00002760| 69 66 20 28 28 63 68 20 | 3d 3d 20 63 68 72 65 74 |if ((ch |== chret|
|00002770| 75 72 6e 29 20 7c 7c 20 | 28 69 20 3d 3d 20 74 65 |urn) || |(i == te|
|00002780| 78 74 6c 65 6e 67 74 68 | 29 29 20 7b 0d 09 09 09 |xtlength|)) {....|
|00002790| 0d 09 09 09 73 68 6f 72 | 74 20 77 3b 0d 09 09 09 |....shor|t w;....|
|000027a0| 0d 09 09 09 77 20 3d 20 | 54 65 78 74 57 69 64 74 |....w = |TextWidt|
|000027b0| 68 20 28 2a 68 74 65 78 | 74 2c 20 69 78 6c 69 6e |h (*htex|t, ixlin|
|000027c0| 65 73 74 61 72 74 2c 20 | 6c 69 6e 65 6c 65 6e 67 |estart, |lineleng|
|000027d0| 74 68 29 3b 0d 09 09 09 | 0d 09 09 09 69 66 20 28 |th);....|....if (|
|000027e0| 77 20 3e 20 6d 61 78 77 | 69 64 74 68 29 0d 09 09 |w > maxw|idth)...|
|000027f0| 09 09 6d 61 78 77 69 64 | 74 68 20 3d 20 77 3b 0d |..maxwid|th = w;.|
|00002800| 09 09 09 0d 09 09 09 69 | 66 20 28 63 68 20 3d 3d |.......i|f (ch ==|
|00002810| 20 63 68 72 65 74 75 72 | 6e 29 0d 09 09 09 09 63 | chretur|n).....c|
|00002820| 74 6c 69 6e 65 73 2b 2b | 3b 0d 09 09 09 0d 09 09 |tlines++|;.......|
|00002830| 09 69 78 6c 69 6e 65 73 | 74 61 72 74 20 2b 3d 20 |.ixlines|tart += |
|00002840| 6c 69 6e 65 6c 65 6e 67 | 74 68 20 2b 20 31 3b 0d |lineleng|th + 1;.|
|00002850| 09 09 09 0d 09 09 09 6c | 69 6e 65 6c 65 6e 67 74 |.......l|inelengt|
|00002860| 68 20 3d 20 30 3b 0d 09 | 09 09 7d 0d 09 09 65 6c |h = 0;..|..}...el|
|00002870| 73 65 0d 09 09 09 6c 69 | 6e 65 6c 65 6e 67 74 68 |se....li|nelength|
|00002880| 2b 2b 3b 0d 09 09 7d 20 | 2f 2a 66 6f 72 2a 2f 0d |++;...} |/*for*/.|
|00002890| 0d 09 6d 61 78 77 69 64 | 74 68 20 3d 20 6d 61 78 |..maxwid|th = max|
|000028a0| 20 28 6d 61 78 77 69 64 | 74 68 2c 20 6d 69 6e 74 | (maxwid|th, mint|
|000028b0| 65 78 74 77 69 64 74 68 | 29 3b 0d 09 0d 09 6d 61 |extwidth|);....ma|
|000028c0| 78 77 69 64 74 68 20 2b | 3d 20 32 20 2a 20 74 65 |xwidth +|= 2 * te|
|000028d0| 78 74 68 6f 72 69 7a 69 | 6e 73 65 74 3b 0d 09 0d |xthorizi|nset;...|
|000028e0| 09 6d 61 78 77 69 64 74 | 68 2b 2b 3b 20 2f 2a 61 |.maxwidt|h++; /*a|
|000028f0| 73 6b 20 66 6f 72 20 6f | 6e 65 20 65 78 74 72 61 |sk for o|ne extra|
|00002900| 20 70 69 78 65 6c 2c 20 | 77 6f 72 6b 20 61 72 6f | pixel, |work aro|
|00002910| 75 6e 64 20 54 45 20 64 | 69 73 70 6c 61 79 20 61 |und TE d|isplay a|
|00002920| 6e 6f 6d 61 6c 79 2a 2f | 0d 09 0d 09 2a 77 69 64 |nomaly*/|....*wid|
|00002930| 74 68 20 3d 20 6d 61 78 | 77 69 64 74 68 3b 0d 09 |th = max|width;..|
|00002940| 0d 09 76 65 72 74 70 69 | 78 65 6c 73 20 3d 20 63 |..vertpi|xels = c|
|00002950| 74 6c 69 6e 65 73 20 2a | 20 28 67 6c 6f 62 61 6c |tlines *| (global|
|00002960| 66 6f 6e 74 69 6e 66 6f | 2e 61 73 63 65 6e 74 20 |fontinfo|.ascent |
|00002970| 2b 20 67 6c 6f 62 61 6c | 66 6f 6e 74 69 6e 66 6f |+ global|fontinfo|
|00002980| 2e 64 65 73 63 65 6e 74 | 20 2b 20 67 6c 6f 62 61 |.descent| + globa|
|00002990| 6c 66 6f 6e 74 69 6e 66 | 6f 2e 6c 65 61 64 69 6e |lfontinf|o.leadin|
|000029a0| 67 29 3b 0d 09 0d 09 2a | 68 65 69 67 68 74 20 3d |g);....*|height =|
|000029b0| 20 76 65 72 74 70 69 78 | 65 6c 73 20 2b 20 28 32 | vertpix|els + (2|
|000029c0| 20 2a 20 74 65 78 74 76 | 65 72 74 69 6e 73 65 74 | * textv|ertinset|
|000029d0| 29 3b 0d 09 7d 20 2f 2a | 65 64 69 74 67 65 74 73 |);..} /*|editgets|
|000029e0| 69 7a 65 2a 2f 0d 09 0d | 09 0d 76 6f 69 64 20 65 |ize*/...|..void e|
|000029f0| 64 69 74 67 65 74 62 75 | 66 66 65 72 73 69 7a 65 |ditgetbu|ffersize|
|00002a00| 20 28 68 64 6c 65 64 69 | 74 72 65 63 6f 72 64 20 | (hdledi|trecord |
|00002a10| 68 62 75 66 66 65 72 2c | 20 73 68 6f 72 74 20 2a |hbuffer,| short *|
|00002a20| 68 65 69 67 68 74 2c 20 | 73 68 6f 72 74 20 2a 77 |height, |short *w|
|00002a30| 69 64 74 68 29 20 7b 0d | 09 0d 09 2f 2a 0d 09 38 |idth) {.|.../*..8|
|00002a40| 2f 38 2f 39 32 20 44 57 | 20 66 6f 72 20 53 6e 75 |/8/92 DW| for Snu|
|00002a50| 66 66 79 3a 20 63 61 6e | 27 74 20 72 65 6c 79 20 |ffy: can|'t rely |
|00002a60| 6f 6e 20 74 68 65 20 76 | 61 6c 75 65 20 66 6f 72 |on the v|alue for|
|00002a70| 20 68 65 69 67 68 74 20 | 72 65 74 75 72 6e 65 64 | height |returned|
|00002a80| 20 62 79 20 65 64 69 74 | 67 65 74 73 69 7a 65 2c | by edit|getsize,|
|00002a90| 20 0d 09 73 69 6e 63 65 | 20 69 74 20 64 6f 65 73 | ..since| it does|
|00002aa0| 6e 27 74 20 74 61 6b 65 | 20 77 6f 72 64 2d 77 72 |n't take| word-wr|
|00002ab0| 61 70 70 69 6e 67 20 69 | 6e 74 6f 20 61 63 63 6f |apping i|nto acco|
|00002ac0| 75 6e 74 2e 0d 09 2a 2f | 0d 09 0d 09 54 45 48 61 |unt...*/|....TEHa|
|00002ad0| 6e 64 6c 65 20 6d 61 63 | 62 75 66 66 65 72 3b 0d |ndle mac|buffer;.|
|00002ae0| 09 63 68 61 72 20 6c 61 | 73 74 63 68 61 72 3b 0d |.char la|stchar;.|
|00002af0| 09 0d 09 69 66 20 28 21 | 67 65 74 6d 61 63 62 75 |...if (!|getmacbu|
|00002b00| 66 66 65 72 20 28 68 62 | 75 66 66 65 72 2c 20 26 |ffer (hb|uffer, &|
|00002b10| 6d 61 63 62 75 66 66 65 | 72 29 29 0d 09 09 72 65 |macbuffe|r))...re|
|00002b20| 74 75 72 6e 3b 0d 09 0d | 09 65 64 69 74 67 65 74 |turn;...|.editget|
|00002b30| 73 69 7a 65 20 28 28 2a | 2a 6d 61 63 62 75 66 66 |size ((*|*macbuff|
|00002b40| 65 72 29 2e 68 54 65 78 | 74 2c 20 68 65 69 67 68 |er).hTex|t, heigh|
|00002b50| 74 2c 20 77 69 64 74 68 | 29 3b 0d 09 0d 09 69 66 |t, width|);....if|
|00002b60| 20 28 28 2a 2a 68 62 75 | 66 66 65 72 29 2e 66 6c | ((**hbu|ffer).fl|
|00002b70| 77 69 6e 64 6f 77 62 61 | 73 65 64 29 20 7b 0d 09 |windowba|sed) {..|
|00002b80| 0d 09 09 2a 68 65 69 67 | 68 74 20 3d 20 28 28 2a |...*heig|ht = ((*|
|00002b90| 2a 6d 61 63 62 75 66 66 | 65 72 29 2e 6e 4c 69 6e |*macbuff|er).nLin|
|00002ba0| 65 73 20 2a 20 28 2a 2a | 6d 61 63 62 75 66 66 65 |es * (**|macbuffe|
|00002bb0| 72 29 2e 6c 69 6e 65 48 | 65 69 67 68 74 29 20 2b |r).lineH|eight) +|
|00002bc0| 20 67 6c 6f 62 61 6c 66 | 6f 6e 74 69 6e 66 6f 2e | globalf|ontinfo.|
|00002bd0| 64 65 73 63 65 6e 74 3b | 0d 09 09 0d 09 09 6c 61 |descent;|......la|
|00002be0| 73 74 63 68 61 72 20 3d | 20 28 2a 28 2a 2a 6d 61 |stchar =| (*(**ma|
|00002bf0| 63 62 75 66 66 65 72 29 | 2e 68 54 65 78 74 29 20 |cbuffer)|.hText) |
|00002c00| 5b 28 2a 2a 6d 61 63 62 | 75 66 66 65 72 29 2e 74 |[(**macb|uffer).t|
|00002c10| 65 4c 65 6e 67 74 68 20 | 2d 20 31 5d 3b 0d 09 09 |eLength |- 1];...|
|00002c20| 0d 09 09 69 66 20 28 6c | 61 73 74 63 68 61 72 20 |...if (l|astchar |
|00002c30| 21 3d 20 63 68 72 65 74 | 75 72 6e 29 20 2f 2a 61 |!= chret|urn) /*a|
|00002c40| 20 71 75 69 72 6b 20 6f | 66 20 54 45 2a 2f 0d 09 | quirk o|f TE*/..|
|00002c50| 09 09 2a 68 65 69 67 68 | 74 20 2b 3d 20 28 2a 2a |..*heigh|t += (**|
|00002c60| 6d 61 63 62 75 66 66 65 | 72 29 2e 6c 69 6e 65 48 |macbuffe|r).lineH|
|00002c70| 65 69 67 68 74 3b 0d 09 | 09 0d 09 09 69 66 20 28 |eight;..|....if (|
|00002c80| 28 2a 2a 6d 61 63 62 75 | 66 66 65 72 29 2e 63 72 |(**macbu|ffer).cr|
|00002c90| 4f 6e 6c 79 20 3d 3d 20 | 31 29 20 7b 20 2f 2a 77 |Only == |1) { /*w|
|00002ca0| 6f 72 64 2d 77 72 61 70 | 70 69 6e 67 20 74 75 72 |ord-wrap|ping tur|
|00002cb0| 6e 65 64 20 6f 6e 2a 2f | 0d 09 09 0d 09 09 09 52 |ned on*/|.......R|
|00002cc0| 65 63 74 20 72 20 3d 20 | 28 2a 2a 6d 61 63 62 75 |ect r = |(**macbu|
|00002cd0| 66 66 65 72 29 2e 64 65 | 73 74 52 65 63 74 3b 0d |ffer).de|stRect;.|
|00002ce0| 09 09 0d 09 09 09 2a 77 | 69 64 74 68 20 3d 20 72 |......*w|idth = r|
|00002cf0| 2e 72 69 67 68 74 20 2d | 20 72 2e 6c 65 66 74 3b |.right -| r.left;|
|00002d00| 0d 09 09 09 7d 0d 09 09 | 7d 0d 09 09 0d 09 2a 77 |....}...|}.....*w|
|00002d10| 69 64 74 68 20 2b 3d 20 | 32 20 2a 20 74 65 78 74 |idth += |2 * text|
|00002d20| 68 6f 72 69 7a 69 6e 73 | 65 74 3b 0d 09 0d 09 2a |horizins|et;....*|
|00002d30| 68 65 69 67 68 74 20 2b | 3d 20 32 20 2a 20 74 65 |height +|= 2 * te|
|00002d40| 78 74 76 65 72 74 69 6e | 73 65 74 3b 0d 09 7d 20 |xtvertin|set;..} |
|00002d50| 2f 2a 65 64 69 74 67 65 | 74 62 75 66 66 65 72 73 |/*editge|tbuffers|
|00002d60| 69 7a 65 2a 2f 0d 09 0d | 09 0d 62 6f 6f 6c 65 61 |ize*/...|..boolea|
|00002d70| 6e 20 65 64 69 74 67 65 | 74 74 65 78 74 68 61 6e |n editge|ttexthan|
|00002d80| 64 6c 65 20 28 68 64 6c | 65 64 69 74 72 65 63 6f |dle (hdl|editreco|
|00002d90| 72 64 20 68 62 75 66 66 | 65 72 2c 20 48 61 6e 64 |rd hbuff|er, Hand|
|00002da0| 6c 65 20 2a 68 74 65 78 | 74 29 20 7b 0d 09 0d 09 |le *htex|t) {....|
|00002db0| 2f 2a 0d 09 72 65 74 75 | 72 6e 20 74 68 65 20 74 |/*..retu|rn the t|
|00002dc0| 65 78 74 20 68 61 6e 64 | 6c 65 20 66 72 6f 6d 20 |ext hand|le from |
|00002dd0| 74 68 65 20 65 64 69 74 | 20 62 75 66 66 65 72 2e |the edit| buffer.|
|00002de0| 20 64 6f 20 6e 6f 74 20 | 64 69 73 70 6f 73 65 20 | do not |dispose |
|00002df0| 74 68 65 20 68 61 6e 64 | 6c 65 20 6f 72 0d 09 61 |the hand|le or..a|
|00002e00| 6c 74 65 72 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |lter the| length |
|00002e10| 6f 66 20 74 68 65 20 74 | 65 78 74 2e 0d 09 2a 2f |of the t|ext...*/|
|00002e20| 0d 0d 09 54 45 48 61 6e | 64 6c 65 20 6d 61 63 62 |...TEHan|dle macb|
|00002e30| 75 66 66 65 72 3b 0d 09 | 0d 09 69 66 20 28 21 67 |uffer;..|..if (!g|
|00002e40| 65 74 6d 61 63 62 75 66 | 66 65 72 20 28 68 62 75 |etmacbuf|fer (hbu|
|00002e50| 66 66 65 72 2c 20 26 6d | 61 63 62 75 66 66 65 72 |ffer, &m|acbuffer|
|00002e60| 29 29 0d 09 09 72 65 74 | 75 72 6e 20 28 66 61 6c |))...ret|urn (fal|
|00002e70| 73 65 29 3b 0d 09 09 0d | 09 2a 68 74 65 78 74 20 |se);....|.*htext |
|00002e80| 3d 20 28 2a 2a 6d 61 63 | 62 75 66 66 65 72 29 2e |= (**mac|buffer).|
|00002e90| 68 54 65 78 74 3b 0d 09 | 0d 09 72 65 74 75 72 6e |hText;..|..return|
|00002ea0| 20 28 74 72 75 65 29 3b | 0d 09 7d 20 2f 2a 65 64 | (true);|..} /*ed|
|00002eb0| 69 74 67 65 74 74 65 78 | 74 68 61 6e 64 6c 65 2a |itgettex|thandle*|
|00002ec0| 2f 0d 0d 0d 62 6f 6f 6c | 65 61 6e 20 65 64 69 74 |/...bool|ean edit|
|00002ed0| 6e 65 77 62 75 66 66 65 | 72 66 72 6f 6d 68 61 6e |newbuffe|rfromhan|
|00002ee0| 64 6c 65 20 28 52 65 63 | 74 20 72 2c 20 62 6f 6f |dle (Rec|t r, boo|
|00002ef0| 6c 65 61 6e 20 66 6c 77 | 6f 72 64 77 72 61 70 2c |lean flw|ordwrap,|
|00002f00| 20 48 61 6e 64 6c 65 20 | 68 74 65 78 74 2c 20 68 | Handle |htext, h|
|00002f10| 64 6c 65 64 69 74 72 65 | 63 6f 72 64 20 2a 68 72 |dleditre|cord *hr|
|00002f20| 65 63 6f 72 64 29 20 7b | 0d 09 0d 09 72 65 67 69 |ecord) {|....regi|
|00002f30| 73 74 65 72 20 68 64 6c | 65 64 69 74 72 65 63 6f |ster hdl|editreco|
|00002f40| 72 64 20 68 3b 0d 09 72 | 65 67 69 73 74 65 72 20 |rd h;..r|egister |
|00002f50| 54 45 48 61 6e 64 6c 65 | 20 6d 61 63 62 75 66 66 |TEHandle| macbuff|
|00002f60| 65 72 3b 0d 09 0d 09 69 | 66 20 28 21 6e 65 77 63 |er;....i|f (!newc|
|00002f70| 6c 65 61 72 68 61 6e 64 | 6c 65 20 28 6c 6f 6e 67 |learhand|le (long|
|00002f80| 73 69 7a 65 6f 66 20 28 | 74 79 65 64 69 74 72 65 |sizeof (|tyeditre|
|00002f90| 63 6f 72 64 29 2c 20 28 | 48 61 6e 64 6c 65 20 2a |cord), (|Handle *|
|00002fa0| 29 20 68 72 65 63 6f 72 | 64 29 29 0d 09 09 72 65 |) hrecor|d))...re|
|00002fb0| 74 75 72 6e 20 28 66 61 | 6c 73 65 29 3b 0d 09 09 |turn (fa|lse);...|
|00002fc0| 0d 09 68 20 3d 20 2a 68 | 72 65 63 6f 72 64 3b 20 |..h = *h|record; |
|00002fd0| 2f 2a 63 6f 70 79 20 69 | 6e 74 6f 20 72 65 67 69 |/*copy i|nto regi|
|00002fe0| 73 74 65 72 2a 2f 0d 09 | 0d 09 49 6e 73 65 74 52 |ster*/..|..InsetR|
|00002ff0| 65 63 74 20 28 26 72 2c | 20 74 65 78 74 68 6f 72 |ect (&r,| texthor|
|00003000| 69 7a 69 6e 73 65 74 2c | 20 74 65 78 74 76 65 72 |izinset,| textver|
|00003010| 74 69 6e 73 65 74 29 3b | 0d 09 09 0d 09 6d 61 63 |tinset);|.....mac|
|00003020| 62 75 66 66 65 72 20 3d | 20 54 45 4e 65 77 20 28 |buffer =| TENew (|
|00003030| 26 72 2c 20 26 72 29 3b | 0d 09 0d 09 69 66 20 28 |&r, &r);|....if (|
|00003040| 6d 61 63 62 75 66 66 65 | 72 20 3d 3d 20 6e 69 6c |macbuffe|r == nil|
|00003050| 29 20 7b 20 2f 2a 6d 65 | 6d 6f 72 79 20 65 72 72 |) { /*me|mory err|
|00003060| 6f 72 2a 2f 0d 09 09 0d | 09 09 64 69 73 70 6f 73 |or*/....|..dispos|
|00003070| 65 68 61 6e 64 6c 65 20 | 28 28 48 61 6e 64 6c 65 |ehandle |((Handle|
|00003080| 29 20 68 29 3b 0d 09 09 | 0d 09 09 2a 68 72 65 63 |) h);...|...*hrec|
|00003090| 6f 72 64 20 3d 20 6e 69 | 6c 3b 0d 09 09 0d 09 09 |ord = ni|l;......|
|000030a0| 72 65 74 75 72 6e 20 28 | 66 61 6c 73 65 29 3b 0d |return (|false);.|
|000030b0| 09 09 7d 0d 09 09 0d 09 | 69 66 20 28 66 6c 77 6f |..}.....|if (flwo|
|000030c0| 72 64 77 72 61 70 29 0d | 09 09 28 2a 2a 6d 61 63 |rdwrap).|..(**mac|
|000030d0| 62 75 66 66 65 72 29 2e | 63 72 4f 6e 6c 79 20 3d |buffer).|crOnly =|
|000030e0| 20 31 3b 0d 09 65 6c 73 | 65 0d 09 09 28 2a 2a 6d | 1;..els|e...(**m|
|000030f0| 61 63 62 75 66 66 65 72 | 29 2e 63 72 4f 6e 6c 79 |acbuffer|).crOnly|
|00003100| 20 3d 20 2d 31 3b 0d 0d | 09 6c 6f 63 6b 68 61 6e | = -1;..|.lockhan|
|00003110| 64 6c 65 20 28 68 74 65 | 78 74 29 3b 0d 09 0d 09 |dle (hte|xt);....|
|00003120| 54 45 53 65 74 54 65 78 | 74 20 28 2a 68 74 65 78 |TESetTex|t (*htex|
|00003130| 74 2c 20 47 65 74 48 61 | 6e 64 6c 65 53 69 7a 65 |t, GetHa|ndleSize|
|00003140| 20 28 68 74 65 78 74 29 | 2c 20 6d 61 63 62 75 66 | (htext)|, macbuf|
|00003150| 66 65 72 29 3b 0d 09 0d | 09 75 6e 6c 6f 63 6b 68 |fer);...|.unlockh|
|00003160| 61 6e 64 6c 65 20 28 68 | 74 65 78 74 29 3b 0d 09 |andle (h|text);..|
|00003170| 0d 09 54 45 41 63 74 69 | 76 61 74 65 20 28 6d 61 |..TEActi|vate (ma|
|00003180| 63 62 75 66 66 65 72 29 | 3b 0d 09 0d 09 28 2a 2a |cbuffer)|;....(**|
|00003190| 68 29 2e 6d 61 63 62 75 | 66 66 65 72 20 3d 20 6d |h).macbu|ffer = m|
|000031a0| 61 63 62 75 66 66 65 72 | 3b 0d 09 0d 09 72 65 74 |acbuffer|;....ret|
|000031b0| 75 72 6e 20 28 74 72 75 | 65 29 3b 0d 09 7d 20 2f |urn (tru|e);..} /|
|000031c0| 2a 65 64 69 74 6e 65 77 | 62 75 66 66 65 72 66 72 |*editnew|bufferfr|
|000031d0| 6f 6d 68 61 6e 64 6c 65 | 2a 2f 0d 09 0d 09 0d 62 |omhandle|*/.....b|
|000031e0| 6f 6f 6c 65 61 6e 20 65 | 64 69 74 73 65 74 74 65 |oolean e|ditsette|
|000031f0| 78 74 68 61 6e 64 6c 65 | 20 28 68 64 6c 65 64 69 |xthandle| (hdledi|
|00003200| 74 72 65 63 6f 72 64 20 | 68 72 65 63 6f 72 64 2c |trecord |hrecord,|
|00003210| 20 48 61 6e 64 6c 65 20 | 68 74 65 78 74 29 20 7b | Handle |htext) {|
|00003220| 0d 0d 09 54 45 48 61 6e | 64 6c 65 20 6d 61 63 62 |...TEHan|dle macb|
|00003230| 75 66 66 65 72 3b 0d 09 | 0d 09 69 66 20 28 21 67 |uffer;..|..if (!g|
|00003240| 65 74 6d 61 63 62 75 66 | 66 65 72 20 28 68 72 65 |etmacbuf|fer (hre|
|00003250| 63 6f 72 64 2c 20 26 6d | 61 63 62 75 66 66 65 72 |cord, &m|acbuffer|
|00003260| 29 29 0d 09 09 72 65 74 | 75 72 6e 20 28 66 61 6c |))...ret|urn (fal|
|00003270| 73 65 29 3b 0d 09 09 0d | 09 6c 6f 63 6b 68 61 6e |se);....|.lockhan|
|00003280| 64 6c 65 20 28 68 74 65 | 78 74 29 3b 0d 09 0d 09 |dle (hte|xt);....|
|00003290| 54 45 53 65 74 54 65 78 | 74 20 28 2a 68 74 65 78 |TESetTex|t (*htex|
|000032a0| 74 2c 20 47 65 74 48 61 | 6e 64 6c 65 53 69 7a 65 |t, GetHa|ndleSize|
|000032b0| 20 28 68 74 65 78 74 29 | 2c 20 6d 61 63 62 75 66 | (htext)|, macbuf|
|000032c0| 66 65 72 29 3b 0d 09 0d | 09 75 6e 6c 6f 63 6b 68 |fer);...|.unlockh|
|000032d0| 61 6e 64 6c 65 20 28 68 | 74 65 78 74 29 3b 0d 09 |andle (h|text);..|
|000032e0| 0d 09 72 65 74 75 72 6e | 20 28 74 72 75 65 29 3b |..return| (true);|
|000032f0| 0d 09 7d 20 2f 2a 65 64 | 69 74 73 65 74 74 65 78 |..} /*ed|itsettex|
|00003300| 74 68 61 6e 64 6c 65 2a | 2f 0d 09 0d 09 0d 62 6f |thandle*|/.....bo|
|00003310| 6f 6c 65 61 6e 20 65 64 | 69 74 67 65 74 74 65 78 |olean ed|itgettex|
|00003320| 74 68 61 6e 64 6c 65 63 | 6f 70 79 20 28 68 64 6c |thandlec|opy (hdl|
|00003330| 65 64 69 74 72 65 63 6f | 72 64 20 68 62 75 66 66 |editreco|rd hbuff|
|00003340| 65 72 2c 20 48 61 6e 64 | 6c 65 20 2a 68 74 65 78 |er, Hand|le *htex|
|00003350| 74 29 20 7b 0d 09 0d 09 | 2f 2a 0d 09 63 61 6c 6c |t) {....|/*..call|
|00003360| 65 72 20 6d 75 73 74 20 | 64 69 73 70 6f 73 65 20 |er must |dispose |
|00003370| 6f 66 20 74 68 65 20 68 | 61 6e 64 6c 65 20 77 65 |of the h|andle we|
|00003380| 20 61 6c 6c 6f 63 61 74 | 65 2e 0d 09 0d 09 37 2f | allocat|e.....7/|
|00003390| 38 2f 39 32 20 44 57 3a | 20 69 66 20 74 68 65 72 |8/92 DW:| if ther|
|000033a0| 65 20 69 73 20 6e 6f 20 | 74 65 78 74 2c 20 72 65 |e is no |text, re|
|000033b0| 74 75 72 6e 20 74 72 75 | 65 20 77 69 74 68 20 68 |turn tru|e with h|
|000033c0| 74 65 78 74 20 3d 3d 20 | 6e 69 6c 2e 0d 09 2a 2f |text == |nil...*/|
|000033d0| 0d 0d 09 54 45 48 61 6e | 64 6c 65 20 6d 61 63 62 |...TEHan|dle macb|
|000033e0| 75 66 66 65 72 3b 0d 09 | 48 61 6e 64 6c 65 20 68 |uffer;..|Handle h|
|000033f0| 3b 0d 09 0d 09 69 66 20 | 28 21 67 65 74 6d 61 63 |;....if |(!getmac|
|00003400| 62 75 66 66 65 72 20 28 | 68 62 75 66 66 65 72 2c |buffer (|hbuffer,|
|00003410| 20 26 6d 61 63 62 75 66 | 66 65 72 29 29 0d 09 09 | &macbuf|fer))...|
|00003420| 72 65 74 75 72 6e 20 28 | 66 61 6c 73 65 29 3b 0d |return (|false);.|
|00003430| 09 0d 09 68 20 3d 20 28 | 2a 2a 6d 61 63 62 75 66 |...h = (|**macbuf|
|00003440| 66 65 72 29 2e 68 54 65 | 78 74 3b 0d 09 0d 09 69 |fer).hTe|xt;....i|
|00003450| 66 20 28 47 65 74 48 61 | 6e 64 6c 65 53 69 7a 65 |f (GetHa|ndleSize|
|00003460| 20 28 68 29 20 3d 3d 20 | 30 29 20 7b 0d 09 0d 09 | (h) == |0) {....|
|00003470| 09 2a 68 74 65 78 74 20 | 3d 20 6e 69 6c 3b 0d 09 |.*htext |= nil;..|
|00003480| 09 0d 09 09 72 65 74 75 | 72 6e 20 28 74 72 75 65 |....retu|rn (true|
|00003490| 29 3b 0d 09 09 7d 0d 09 | 0d 09 72 65 74 75 72 6e |);...}..|..return|
|000034a0| 20 28 63 6f 70 79 68 61 | 6e 64 6c 65 20 28 68 2c | (copyha|ndle (h,|
|000034b0| 20 68 74 65 78 74 29 29 | 3b 0d 09 7d 20 2f 2a 65 | htext))|;..} /*e|
|000034c0| 64 69 74 67 65 74 74 65 | 78 74 68 61 6e 64 6c 65 |ditgette|xthandle|
|000034d0| 63 6f 70 79 2a 2f 0d 0d | 0d 62 6f 6f 6c 65 61 6e |copy*/..|.boolean|
|000034e0| 20 65 64 69 74 68 61 76 | 65 73 65 6c 65 63 74 69 | edithav|eselecti|
|000034f0| 6f 6e 20 28 68 64 6c 65 | 64 69 74 72 65 63 6f 72 |on (hdle|ditrecor|
|00003500| 64 20 68 62 75 66 66 65 | 72 29 20 7b 0d 0d 09 54 |d hbuffe|r) {...T|
|00003510| 45 48 61 6e 64 6c 65 20 | 6d 61 63 62 75 66 66 65 |EHandle |macbuffe|
|00003520| 72 3b 0d 09 0d 09 69 66 | 20 28 21 67 65 74 6d 61 |r;....if| (!getma|
|00003530| 63 62 75 66 66 65 72 20 | 28 68 62 75 66 66 65 72 |cbuffer |(hbuffer|
|00003540| 2c 20 26 6d 61 63 62 75 | 66 66 65 72 29 29 0d 09 |, &macbu|ffer))..|
|00003550| 09 72 65 74 75 72 6e 20 | 28 66 61 6c 73 65 29 3b |.return |(false);|
|00003560| 0d 09 0d 09 72 65 74 75 | 72 6e 20 28 28 2a 2a 6d |....retu|rn ((**m|
|00003570| 61 63 62 75 66 66 65 72 | 29 2e 73 65 6c 53 74 61 |acbuffer|).selSta|
|00003580| 72 74 20 21 3d 20 28 2a | 2a 6d 61 63 62 75 66 66 |rt != (*|*macbuff|
|00003590| 65 72 29 2e 73 65 6c 45 | 6e 64 29 3b 0d 09 7d 20 |er).selE|nd);..} |
|000035a0| 2f 2a 65 64 69 74 68 61 | 76 65 73 65 6c 65 63 74 |/*editha|veselect|
|000035b0| 69 6f 6e 2a 2f 0d 09 0d | 09 0d 62 6f 6f 6c 65 61 |ion*/...|..boolea|
|000035c0| 6e 20 65 64 69 74 73 63 | 72 6f 6c 6c 20 28 68 64 |n editsc|roll (hd|
|000035d0| 6c 65 64 69 74 72 65 63 | 6f 72 64 20 68 62 75 66 |leditrec|ord hbuf|
|000035e0| 66 65 72 2c 20 73 68 6f | 72 74 20 64 68 2c 20 73 |fer, sho|rt dh, s|
|000035f0| 68 6f 72 74 20 64 76 29 | 20 7b 0d 0d 09 54 45 48 |hort dv)| {...TEH|
|00003600| 61 6e 64 6c 65 20 6d 61 | 63 62 75 66 66 65 72 3b |andle ma|cbuffer;|
|00003610| 0d 09 0d 09 69 66 20 28 | 21 67 65 74 6d 61 63 62 |....if (|!getmacb|
|00003620| 75 66 66 65 72 20 28 68 | 62 75 66 66 65 72 2c 20 |uffer (h|buffer, |
|00003630| 26 6d 61 63 62 75 66 66 | 65 72 29 29 0d 09 09 72 |&macbuff|er))...r|
|00003640| 65 74 75 72 6e 20 28 66 | 61 6c 73 65 29 3b 0d 09 |eturn (f|alse);..|
|00003650| 09 0d 09 65 64 69 74 70 | 72 65 73 63 72 6f 6c 6c |...editp|rescroll|
|00003660| 20 28 68 62 75 66 66 65 | 72 29 3b 0d 09 0d 09 54 | (hbuffe|r);....T|
|00003670| 45 53 63 72 6f 6c 6c 20 | 28 64 68 2c 20 64 76 2c |EScroll |(dh, dv,|
|00003680| 20 6d 61 63 62 75 66 66 | 65 72 29 3b 0d 09 0d 09 | macbuff|er);....|
|00003690| 65 64 69 74 73 65 74 73 | 63 72 6f 6c 6c 76 61 6c |editsets|crollval|
|000036a0| 75 65 73 20 28 68 62 75 | 66 66 65 72 29 3b 0d 09 |ues (hbu|ffer);..|
|000036b0| 0d 09 72 65 74 75 72 6e | 20 28 74 72 75 65 29 3b |..return| (true);|
|000036c0| 0d 09 7d 20 2f 2a 65 64 | 69 74 68 61 76 65 73 65 |..} /*ed|ithavese|
|000036d0| 6c 65 63 74 69 6f 6e 2a | 2f 0d 09 0d 09 0d 76 6f |lection*|/.....vo|
|000036e0| 69 64 20 65 64 69 74 73 | 63 72 6f 6c 6c 74 6f 20 |id edits|crollto |
|000036f0| 28 68 64 6c 65 64 69 74 | 72 65 63 6f 72 64 20 68 |(hdledit|record h|
|00003700| 62 75 66 66 65 72 2c 20 | 73 68 6f 72 74 20 68 2c |buffer, |short h,|
|00003710| 20 73 68 6f 72 74 20 76 | 29 20 7b 0d 09 09 0d 09 | short v|) {.....|
|00003720| 54 45 48 61 6e 64 6c 65 | 20 6d 61 63 62 75 66 66 |TEHandle| macbuff|
|00003730| 65 72 3b 0d 09 0d 09 69 | 66 20 28 21 67 65 74 6d |er;....i|f (!getm|
|00003740| 61 63 62 75 66 66 65 72 | 20 28 68 62 75 66 66 65 |acbuffer| (hbuffe|
|00003750| 72 2c 20 26 6d 61 63 62 | 75 66 66 65 72 29 29 0d |r, &macb|uffer)).|
|00003760| 09 09 72 65 74 75 72 6e | 3b 0d 09 0d 09 65 64 69 |..return|;....edi|
|00003770| 74 73 65 74 73 63 72 6f | 6c 6c 76 61 6c 75 65 73 |tsetscro|llvalues|
|00003780| 20 28 68 62 75 66 66 65 | 72 29 3b 0d 09 0d 09 65 | (hbuffe|r);....e|
|00003790| 64 69 74 73 63 72 6f 6c | 6c 20 28 68 62 75 66 66 |ditscrol|l (hbuff|
|000037a0| 65 72 2c 20 28 2a 2a 68 | 62 75 66 66 65 72 29 2e |er, (**h|buffer).|
|000037b0| 68 6f 72 69 7a 63 75 72 | 72 65 6e 74 20 2d 20 68 |horizcur|rent - h|
|000037c0| 2c 20 28 2a 2a 68 62 75 | 66 66 65 72 29 2e 76 65 |, (**hbu|ffer).ve|
|000037d0| 72 74 63 75 72 72 65 6e | 74 20 2d 20 76 29 3b 0d |rtcurren|t - v);.|
|000037e0| 09 7d 20 2f 2a 65 64 69 | 74 73 63 72 6f 6c 6c 74 |.} /*edi|tscrollt|
|000037f0| 6f 2a 2f 0d 0d 0d 62 6f | 6f 6c 65 61 6e 20 65 64 |o*/...bo|olean ed|
|00003800| 69 74 72 65 70 6c 61 63 | 65 68 61 6e 64 6c 65 20 |itreplac|ehandle |
|00003810| 28 48 61 6e 64 6c 65 20 | 68 74 65 78 74 2c 20 68 |(Handle |htext, h|
|00003820| 64 6c 65 64 69 74 72 65 | 63 6f 72 64 20 68 62 75 |dleditre|cord hbu|
|00003830| 66 66 65 72 29 20 7b 0d | 0d 09 54 45 48 61 6e 64 |ffer) {.|..TEHand|
|00003840| 6c 65 20 6d 61 63 62 75 | 66 66 65 72 3b 0d 09 0d |le macbu|ffer;...|
|00003850| 09 69 66 20 28 21 67 65 | 74 6d 61 63 62 75 66 66 |.if (!ge|tmacbuff|
|00003860| 65 72 20 28 68 62 75 66 | 66 65 72 2c 20 26 6d 61 |er (hbuf|fer, &ma|
|00003870| 63 62 75 66 66 65 72 29 | 29 0d 09 09 72 65 74 75 |cbuffer)|)...retu|
|00003880| 72 6e 20 28 66 61 6c 73 | 65 29 3b 0d 09 0d 09 65 |rn (fals|e);....e|
|00003890| 64 69 74 70 72 65 73 63 | 72 6f 6c 6c 20 28 68 62 |ditpresc|roll (hb|
|000038a0| 75 66 66 65 72 29 3b 0d | 09 0d 09 69 66 20 28 28 |uffer);.|...if ((|
|000038b0| 2a 2a 6d 61 63 62 75 66 | 66 65 72 29 2e 73 65 6c |**macbuf|fer).sel|
|000038c0| 53 74 61 72 74 20 21 3d | 20 28 2a 2a 6d 61 63 62 |Start !=| (**macb|
|000038d0| 75 66 66 65 72 29 2e 73 | 65 6c 45 6e 64 29 0d 09 |uffer).s|elEnd)..|
|000038e0| 09 54 45 44 65 6c 65 74 | 65 20 28 6d 61 63 62 75 |.TEDelet|e (macbu|
|000038f0| 66 66 65 72 29 3b 0d 09 | 09 0d 09 6c 6f 63 6b 68 |ffer);..|...lockh|
|00003900| 61 6e 64 6c 65 20 28 68 | 74 65 78 74 29 3b 0d 09 |andle (h|text);..|
|00003910| 0d 09 54 45 49 6e 73 65 | 72 74 20 28 2a 68 74 65 |..TEInse|rt (*hte|
|00003920| 78 74 2c 20 47 65 74 48 | 61 6e 64 6c 65 53 69 7a |xt, GetH|andleSiz|
|00003930| 65 20 28 68 74 65 78 74 | 29 2c 20 6d 61 63 62 75 |e (htext|), macbu|
|00003940| 66 66 65 72 29 3b 0d 09 | 0d 09 75 6e 6c 6f 63 6b |ffer);..|..unlock|
|00003950| 68 61 6e 64 6c 65 20 28 | 68 74 65 78 74 29 3b 0d |handle (|htext);.|
|00003960| 09 0d 09 65 64 69 74 73 | 65 74 73 63 72 6f 6c 6c |...edits|etscroll|
|00003970| 76 61 6c 75 65 73 20 28 | 68 62 75 66 66 65 72 29 |values (|hbuffer)|
|00003980| 3b 0d 09 0d 09 72 65 74 | 75 72 6e 20 28 74 72 75 |;....ret|urn (tru|
|00003990| 65 29 3b 20 2f 2a 54 45 | 20 67 69 76 65 73 20 6e |e); /*TE| gives n|
|000039a0| 6f 20 77 61 79 20 74 6f | 20 72 65 74 75 72 6e 20 |o way to| return |
|000039b0| 61 6e 20 65 72 72 6f 72 | 2a 2f 0d 09 7d 20 2f 2a |an error|*/..} /*|
|000039c0| 65 64 69 74 72 65 70 6c | 61 63 65 68 61 6e 64 6c |editrepl|acehandl|
|000039d0| 65 2a 2f 0d 09 0d 09 0d | 62 6f 6f 6c 65 61 6e 20 |e*/.....|boolean |
|000039e0| 65 64 69 74 67 65 74 73 | 65 6c 65 63 74 65 64 74 |editgets|electedt|
|000039f0| 65 78 74 68 61 6e 64 6c | 65 20 28 68 64 6c 65 64 |exthandl|e (hdled|
|00003a00| 69 74 72 65 63 6f 72 64 | 20 68 62 75 66 66 65 72 |itrecord| hbuffer|
|00003a10| 2c 20 48 61 6e 64 6c 65 | 20 2a 68 74 65 78 74 29 |, Handle| *htext)|
|00003a20| 20 7b 0d 0d 09 54 45 48 | 61 6e 64 6c 65 20 6d 61 | {...TEH|andle ma|
|00003a30| 63 62 75 66 66 65 72 3b | 0d 09 73 68 6f 72 74 20 |cbuffer;|..short |
|00003a40| 73 65 6c 73 74 61 72 74 | 2c 20 73 65 6c 65 6e 64 |selstart|, selend|
|00003a50| 3b 0d 09 73 68 6f 72 74 | 20 6c 65 6e 73 65 6c 3b |;..short| lensel;|
|00003a60| 0d 09 48 61 6e 64 6c 65 | 20 68 3b 0d 09 62 6f 6f |..Handle| h;..boo|
|00003a70| 6c 65 61 6e 20 66 6c 3b | 0d 09 0d 09 69 66 20 28 |lean fl;|....if (|
|00003a80| 21 67 65 74 6d 61 63 62 | 75 66 66 65 72 20 28 68 |!getmacb|uffer (h|
|00003a90| 62 75 66 66 65 72 2c 20 | 26 6d 61 63 62 75 66 66 |buffer, |&macbuff|
|00003aa0| 65 72 29 29 0d 09 09 72 | 65 74 75 72 6e 20 28 66 |er))...r|eturn (f|
|00003ab0| 61 6c 73 65 29 3b 0d 09 | 09 0d 09 73 65 6c 73 74 |alse);..|...selst|
|00003ac0| 61 72 74 20 3d 20 28 2a | 2a 6d 61 63 62 75 66 66 |art = (*|*macbuff|
|00003ad0| 65 72 29 2e 73 65 6c 53 | 74 61 72 74 3b 0d 09 0d |er).selS|tart;...|
|00003ae0| 09 73 65 6c 65 6e 64 20 | 3d 20 28 2a 2a 6d 61 63 |.selend |= (**mac|
|00003af0| 62 75 66 66 65 72 29 2e | 73 65 6c 45 6e 64 3b 0d |buffer).|selEnd;.|
|00003b00| 09 0d 09 6c 65 6e 73 65 | 6c 20 3d 20 73 65 6c 65 |...lense|l = sele|
|00003b10| 6e 64 20 2d 20 73 65 6c | 73 74 61 72 74 3b 0d 09 |nd - sel|start;..|
|00003b20| 0d 09 69 66 20 28 6c 65 | 6e 73 65 6c 20 3c 20 30 |..if (le|nsel < 0|
|00003b30| 29 0d 09 09 6c 65 6e 73 | 65 6c 20 3d 20 30 3b 0d |)...lens|el = 0;.|
|00003b40| 09 09 0d 09 68 20 3d 20 | 28 2a 2a 6d 61 63 62 75 |....h = |(**macbu|
|00003b50| 66 66 65 72 29 2e 68 54 | 65 78 74 3b 0d 09 0d 09 |ffer).hT|ext;....|
|00003b60| 6c 6f 63 6b 68 61 6e 64 | 6c 65 20 28 68 29 3b 0d |lockhand|le (h);.|
|00003b70| 09 0d 09 66 6c 20 3d 20 | 6e 65 77 66 69 6c 6c 65 |...fl = |newfille|
|00003b80| 64 68 61 6e 64 6c 65 20 | 28 26 28 28 2a 68 29 20 |dhandle |(&((*h) |
|00003b90| 5b 73 65 6c 73 74 61 72 | 74 5d 29 2c 20 28 6c 6f |[selstar|t]), (lo|
|00003ba0| 6e 67 29 20 6c 65 6e 73 | 65 6c 2c 20 68 74 65 78 |ng) lens|el, htex|
|00003bb0| 74 29 3b 0d 09 0d 09 75 | 6e 6c 6f 63 6b 68 61 6e |t);....u|nlockhan|
|00003bc0| 64 6c 65 20 28 68 29 3b | 0d 09 0d 09 72 65 74 75 |dle (h);|....retu|
|00003bd0| 72 6e 20 28 66 6c 29 3b | 0d 09 7d 20 2f 2a 65 64 |rn (fl);|..} /*ed|
|00003be0| 69 74 67 65 74 73 65 6c | 65 63 74 65 64 74 65 78 |itgetsel|ectedtex|
|00003bf0| 74 68 61 6e 64 6c 65 2a | 2f 0d 0d 0d 0d 09 0d 09 |thandle*|/.......|
|00003c00| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c80| 00 00 01 00 00 00 01 3a | 00 00 00 3a 00 00 00 32 |.......:|...:...2|
|00003c90| 00 00 00 02 10 4c 61 73 | 74 2d 4d 69 6e 75 74 65 |.....Las|t-Minute|
|00003ca0| 20 49 6e 66 6f 73 01 00 | 00 00 00 05 00 00 00 e6 | Infos..|........|
|00003cb0| 10 61 70 70 6c 65 74 74 | 65 78 74 65 64 69 74 2e |.applett|extedit.|
|00003cc0| 63 70 02 00 00 00 50 61 | 72 74 53 49 54 78 00 00 |cp....Pa|rtSITx..|
|00003cd0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00003ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cf0| 00 00 a9 81 44 d0 00 00 | 00 00 00 00 01 6c 72 73 |....D...|.....lrs|
|00003d00| 01 00 00 00 00 03 00 00 | 0d 6c a6 69 d2 ba a6 69 |........|.l.i...i|
|00003d10| d2 c4 00 00 00 00 01 2a | 01 43 02 4b 03 6c 01 00 |.......*|.C.K.l..|
|00003d20| ff 23 00 bd 01 00 ff f8 | ff f0 00 00 00 00 00 00 |.#......|........|
|00003d30| 00 00 00 00 00 02 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d40| 00 00 00 00 00 00 00 00 | 00 00 80 00 00 00 00 00 |........|........|
|00003d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d60| 16 00 00 00 00 02 10 4c | 61 73 74 2d 4d 69 6e 75 |.......L|ast-Minu|
|00003d70| 74 65 20 49 6e 66 6f 73 | 01 00 00 00 00 05 00 00 |te Infos|........|
|00003d80| 00 00 00 36 00 02 00 1a | 00 00 04 98 00 40 01 10 |...6....|.....@..|
|00003d90| 4e e8 00 00 0b 66 6c 73 | 63 72 6f 6c 6c 65 64 20 |N....fls|crolled |
|00003da0| 00 1a 00 00 04 1f 00 3c | 01 10 4e d8 00 00 0b 66 |.......<|..N....f|
|00003db0| 6c 73 63 72 6f 6c 6c 65 | 64 20 00 00 01 00 00 00 |lscrolle|d ......|
|00003dc0| 01 3a 00 00 00 3a 00 00 | 00 32 00 ed cb 18 0d 98 |.:...:..|.2......|
|00003dd0| 00 00 00 1c 00 32 00 00 | 44 54 56 55 00 00 00 0a |.....2..|DTVU....|
|00003de0| 61 30 ff ff 00 00 00 00 | 00 00 00 00 00 00 00 00 |a0......|........|
|00003df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+